سؤال

What is the PEP status' structure and mean?

These days, I try to write a python2.7 interpreter.

But, I don't know why comparison operator <> arise in python 2.7. (It was not in python 3.0) Figure out it was in the PEP401. The official declarations is for future compatibility (import from future or somewhat)

Something confusing me is that the status was April Fool!

April Fool?

Ref:

  1. http://www.python.org/dev/peps/pep-0401/
  2. http://mail.python.org/pipermail/python-list/2009-April/1202030.html
هل كانت مفيدة؟

المحلول

The linked PEP is, as the status suggests, an April Fool's joke; it is not a real PEP.

There is no distinct <> operator; however, in Python 2, the interpreter will read <> as a synonym for !=. In Python 3, <> is a syntax error.

مرخصة بموجب: CC-BY-SA مع الإسناد
لا تنتمي إلى StackOverflow
scroll top