Login | Register For Free | Help
Search for: (Advanced)

Mailing List Archive: Python: Bugs

[issue7237] Syntax error with not

 

 

Python bugs RSS feed   Index | Next | Previous | View Threaded


report at bugs

Oct 29, 2009, 8:56 AM

Post #1 of 5 (247 views)
Permalink
[issue7237] Syntax error with not

New submission from David W. Lambert <b49P23TIvg [at] stny>:

lambertdw$ p3
Python 3.1.1 (r311:74480, Oct 2 2009, 12:29:57)
[GCC 4.3.3] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> not 23
False
>>> not(23&1)
False
>>> 1+not(23&1)
File "<stdin>", line 1
1+not(23&1)
^
SyntaxError: invalid syntax
>>>

----------
components: Interpreter Core
messages: 94675
nosy: LambertDW
severity: normal
status: open
title: Syntax error with not
type: compile error
versions: Python 3.1

_______________________________________
Python tracker <report [at] bugs>
<http://bugs.python.org/issue7237>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/list-python-bugs%40lists.gossamer-threads.com


report at bugs

Oct 29, 2009, 9:54 AM

Post #2 of 5 (234 views)
Permalink
[issue7237] Syntax error with not [In reply to]

David W. Lambert <b49P23TIvg [at] stny> added the comment:

problem also exists in 2.6.
It's a, in my humble opinion, release blocker.

----------
type: compile error -> behavior

_______________________________________
Python tracker <report [at] bugs>
<http://bugs.python.org/issue7237>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/list-python-bugs%40lists.gossamer-threads.com


report at bugs

Oct 29, 2009, 10:11 AM

Post #3 of 5 (224 views)
Permalink
[issue7237] Syntax error with not [In reply to]

R. David Murray <rdmurray [at] bitdance> added the comment:

>>> 1+not
File "<stdin>", line 1
1+not
^
SyntaxError: invalid syntax
>>> 1+(not(23&1))
1

It's been this way since 2.4 at least, probably earlier.

----------
nosy: +r.david.murray
priority: -> normal
resolution: -> invalid
stage: -> committed/rejected
status: open -> closed

_______________________________________
Python tracker <report [at] bugs>
<http://bugs.python.org/issue7237>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/list-python-bugs%40lists.gossamer-threads.com


report at bugs

Oct 29, 2009, 10:13 AM

Post #4 of 5 (234 views)
Permalink
[issue7237] Syntax error with not [In reply to]

Eric Smith <eric [at] trueblade> added the comment:

I'm not sure what release it would be blocking. The oldest version I
have on hand is 2.4, and it's a problem there. If it hasn't caused an
actual problem in that long, then I don't see it as all that critical.

----------
nosy: +eric.smith

_______________________________________
Python tracker <report [at] bugs>
<http://bugs.python.org/issue7237>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/list-python-bugs%40lists.gossamer-threads.com


report at bugs

Oct 29, 2009, 5:56 PM

Post #5 of 5 (221 views)
Permalink
[issue7237] Syntax error with not [In reply to]

Benjamin Peterson <benjamin [at] python> added the comment:

I believe this is actually correct. not does not bind its operand as
powerfully as + does. Thus the parser sees (1 + not) x, which is quite
correctly a syntax error.

----------
nosy: +benjamin.peterson

_______________________________________
Python tracker <report [at] bugs>
<http://bugs.python.org/issue7237>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/list-python-bugs%40lists.gossamer-threads.com

Python bugs RSS feed   Index | Next | Previous | View Threaded
 
 


Interested in having your list archived? Contact Gossamer Threads
 
  Web Applications & Managed Hosting Powered by Gossamer Threads Inc.