[issue11422] indentation problem in if, elif, else statements

2011-03-06 Thread Victor
Victor added the comment: Thanks, people. Now I understood that both "if" and "else" should be always at the beginning of the lines they are sitting on. -- ___ Python tracker _

[issue11425] Cleanup sample codes in tutorial.

2011-03-06 Thread INADA Naoki
INADA Naoki added the comment: This patch inserts spaces around ** operator but I prefer no spaces around **. Any thoughts? -- ___ Python tracker ___ ___

[issue11426] CSV examples can't close their files

2011-03-06 Thread Graham Wideman
New submission from Graham Wideman : On the csv doc page (.../library/csv.html) most of the examples show creation of an anonymous file object within the csv.reader or csv.writer function, for example... spamWriter = csv.writer(open('eggs.csv', 'w'), delimiter=' ', This anonymity prevent

[issue11427] ctypes from_buffer no longer accepts bytes

2011-03-06 Thread benrg
New submission from benrg : In Python 3.1.3, (c_char*5).from_buffer(b'abcde') worked. In 3.2 it fails with "TypeError: expected an object with a writable buffer interface". This seems to represent a significant decrease in the functionality of ctypes, since, if I understand correctly, it has n

[issue11425] Cleanup sample codes in tutorial.

2011-03-06 Thread Raymond Hettinger
Raymond Hettinger added the comment: Sorry, but I think many of these changes should not be made. Sometime the tight spacing is used for visual grouping. The following look fine and should not be changed because adding spaces around the + or * operator makes the whole sentence harder to ment

[issue11428] with statement looks up __exit__ incorrectly

2011-03-06 Thread benrg
New submission from benrg : class MakeContextHandler: def __init__(self, enter, exit): self.__enter__ = enter self.__exit__ = exit with MakeContextHandler(lambda: None, lambda *e: None): pass In 3.1.3 this worked; in 3.2 it raises AttributeError('__exit__'), which appears to be a bug

[issue4806] Function calls taking a generator as star argument can mask TypeErrors in the generator

2011-03-06 Thread Daniel Urban
Daniel Urban added the comment: I'm attaching an updated patch. Instead !PyIter_Check() this patch checks for tp_iter == NULL && !PySequence_Check. If this condition is false, PyObject_GetIter has a chance to succeed (and if it fails, we shouldn't mask the exception). I also added more test

[issue8847] crash appending list and namedtuple

2011-03-06 Thread benrg
benrg added the comment: The bug is still present in 3.2. -- versions: +Python 3.2 ___ Python tracker ___ ___ Python-bugs-list mailing

[issue11425] Cleanup sample codes in tutorial.

2011-03-06 Thread Georg Brandl
Georg Brandl added the comment: I made the c -> cls change in 88fe1ac48460. Some other fixes have already been made in py3k (like removing the duplicate index keyword), and for the others I completely agree with Raymond. -- nosy: +georg.brandl resolution: rejected -> fixed __

[issue11428] with statement looks up __exit__ incorrectly

2011-03-06 Thread Georg Brandl
Georg Brandl added the comment: The bug is actually in 3.1 and fixed in 3.2: special methods (those with __underscore__ names) are supposed to be looked up on the class, not the instance. -- nosy: +georg.brandl resolution: -> invalid status: open -> closed __

[issue11427] ctypes from_buffer no longer accepts bytes

2011-03-06 Thread Georg Brandl
Changes by Georg Brandl : -- keywords: +3.2regression ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://ma

[issue11429] ctypes is highly eclectic in its raw-memory support

2011-03-06 Thread benrg
New submission from benrg : ctypes accepts bytes objects as arguments to C functions, but not bytearray objects. It has its own array types but seems to be unaware of array.array. It doesn't even understand memoryview objects. I think that all of these types should be passable to C code. Addi

<    1   2