Alex Samuel added the comment:
Here's a real-world case where this can cause unexpected results: A shell
script has a typo in the shebang ("#/!bin/bash") but the execute bit set. It
still runs via the C library's execvp() and also via bash (which uses execve()
but reimp
Alex Samuel added the comment:
How about saving the original value of STR(pnum) and restoring it after
calling ast_for_atom()?
This is not thread-safe, but I don't understand Python's threading model
well enough to know whether the GIL is held in this function.
On 6/17/2010 8:4
New submission from Alex Samuel :
The unary negative optimization in ast_for_factor() seems to modify the ST in a
way changes its meaning.
In Python 3.1.2, the ST is no longer compilable:
$ cat exprbug.py
import parser
st = parser.expr("-3")
print(st.totuple())
compiled = st.compi
Alex Samuel <[EMAIL PROTECTED]> added the comment:
In the sample code I attached, z is an instance of MySet under 3.0rc2. Is
that expected?
Thanks,
Alex
Mark Dickinson wrote:
> Mark Dickinson <[EMAIL PROTECTED]> added the comment:
>
> The bug is that the set operation
New submission from Alex Samuel <[EMAIL PROTECTED]>:
Methods of set and frozenset that return new set or frozenset instances
return instances of subclasses, but these instances are not initialized
correctly. In the attached code sample, z is an instance of MySet but
MySet.__new__ and