कभी-कभी कुंजी शब्दों के पहले और बाद में रिक्त स्थान क्यों छोड़े जा सकते हैं? उदाहरण के लिए, अभिव्यक्ति 2if-1e1else 1
मान्य क्यों है?पायथन को हमेशा कीवर्ड के चारों ओर रिक्त स्थान की आवश्यकता क्यों नहीं होती है?
$ python2
Python 2.7.3 (default, Nov 12 2012, 09:50:25)
[GCC 4.2.1 Compatible Apple Clang 4.1 ((tags/Apple/clang-421.11.66))] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> 2if-1e1else 1
2
$ python3
Python 3.3.0 (default, Nov 12 2012, 10:01:55)
[GCC 4.2.1 Compatible Apple Clang 4.1 ((tags/Apple/clang-421.11.66))] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> 2if-1e1else 1
2
और यहां तक कि PyPy में:
दोनों CPython 2.7 और 3.3 में काम करने के लिए लगता है
identifier ::= (letter|"_") (letter | digit | "_")*
इसलिए, 2if
: अजगर में
$ pypy
Python 2.7.2 (341e1e3821ff, Jun 07 2012, 15:42:54)
[PyPy 1.9.0 with GCC 4.2.1] on darwin
Type "help", "copyright", "credits" or "license" for more information.
And now for something completely different: ``PyPy 1.6 released!''
>>>> 2if-1e1else 1
2
wtf – wim
जो कि perl – jamylak