[issue14246] Accelerated ETree XMLParser cannot handle io.StringIO

2012-03-10 Thread Eli Bendersky
Eli Bendersky added the comment: Both the Python ET and _elementtree use expat, but reach its parsing function in a different path when given a file-like object (StringIO, BytesIO). Python ET reads the stream itself and passes the data to pyexpat's Parse method, which uses PyArg_ParseTuple to

[issue9949] os.path.realpath on Windows does not follow symbolic links

2012-03-10 Thread Dave Burton
Dave Burton added the comment: Excellent! The ntpath.py change is nearly identical in Python 2.7 to the change for Python 3.2. The only difference is that instead of: +elif isinstance(path, bytes): +path = os.getcwdb() It is: +elif isinstance(path, unicode): +

[issue14246] Accelerated ETree XMLParser cannot handle io.StringIO

2012-03-10 Thread Eli Bendersky
Changes by Eli Bendersky : -- assignee: -> eli.bendersky keywords: +3.2regression stage: -> needs patch ___ Python tracker ___ ___ P

[issue14243] NamedTemporaryFile unusable under Windows

2012-03-10 Thread Nick Coghlan
Nick Coghlan added the comment: Dave, decoupling the lifecycle of the created file from the object that created it is exactly what delete=False already covers. The complicated dance in NamedTemporaryFile is only to make *__del__* work a bit more reliably during process shutdown (due to some

[issue14243] NamedTemporaryFile unusable under Windows

2012-03-10 Thread Dave Abrahams
Dave Abrahams added the comment: If file.close() "offers deterministic resource management," then you have to consider the file's open/closed state to be a resource separate from its existence. A NamedTemporaryFile whose close() deterministically managed the open/closed state but not the exi

[issue12568] Add functions to get the width in columns of a character

2012-03-10 Thread Martin v . Löwis
Martin v. Löwis added the comment: poq: I still remain opposed to exposing wcswidth, since it is just as incorrect as any of the other solutions that people have circulated. I could agree to it if it was called "wcswidth", making it clear that it does whatever the C library does, with whateve

[issue9949] os.path.realpath on Windows does not follow symbolic links

2012-03-10 Thread Brian Curtin
Brian Curtin added the comment: file, and the Python 3 version contains the posix__getfinalpathname entry point, but the Python 2 version does not. > > I presume that PyWin32 could also be used to work around this. Too bad it isn't automatically included with Python: > http://sourceforge.net/pr

[issue9949] os.path.realpath on Windows does not follow symbolic links

2012-03-10 Thread Dave Burton
Dave Burton added the comment: It seems that the nt module is implemented in the posixmodule.c source file, and the Python 3 version contains the posix__getfinalpathname entry point, but the Python 2 version does not. I presume that PyWin32 could also be used to work around this. Too bad it

[issue12568] Add functions to get the width in columns of a character

2012-03-10 Thread Martin v . Löwis
Martin v. Löwis added the comment: Tom: I don't think Unicode::GCString implements UAX#11 correctly (but this is really out of scope of this issue). In particular, it contains an ad-hoc decision to introduce the EA_Z east-asian width that UAX#11 doesn't talk about. In most cases, it's probabl

[issue14190] Minor C API documentation bugs

2012-03-10 Thread Ejaj Hassan
Ejaj Hassan added the comment: The diff file is the second submission containing the fixes to the following bugs: * PyCode_GetNumFree accepts a PyCodeObject* not PyObject* * PyOS_strnicmp returns int, not char* * PyUnicode_RichCompare returns PyObject*, not int * PyType_IS_GC needs a PyTypeObje

[issue14251] [PATCH]HTMLParser decode issue

2012-03-10 Thread Ezio Melotti
Ezio Melotti added the comment: See also #3932. -- ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail

[issue14251] [PATCH]HTMLParser decode issue

2012-03-10 Thread Ezio Melotti
Ezio Melotti added the comment: Can you provide a minimal example to reproduce this error? On Python 2 it's always better to decode the HTML first and then pass unicode to the parser. Even though on Python 2 the parser accepts bytes string too, there are a few corner cases where it fails. O

[issue14251] [PATCH]HTMLParser decode issue

2012-03-10 Thread rednaks
New submission from rednaks : Hello ! while parsing a HTML code i got an decode Error : but this issue can be fixed by replacing the last string by s.decode() like in the diff file. I also tried to execute my script under python3.2 and it does not parsing any thing File "/usr/lib/python2.7

[issue14243] NamedTemporaryFile unusable under Windows

2012-03-10 Thread Nick Coghlan
Nick Coghlan added the comment: The whole point of close() methods is to offer deterministic resource management to applications that need it. Pointing out to applications when they're relying on CPython's refcounting for prompt resource cleanup is why many of the standard types now trigger R

[issue14190] Minor C API documentation bugs

2012-03-10 Thread Ejaj Hassan
Ejaj Hassan added the comment: The patch removes the function *PyCodec_KnownEncoding form document codec.rst found in cpython/doc/c-api -- keywords: +patch nosy: +ejjy Added file: http://bugs.python.org/file24779/issues14190.diff ___ Python tracker

[issue14250] regex.flags is never equal to 0

2012-03-10 Thread R. David Murray
R. David Murray added the comment: 32 is re.U, which is always ored with the passed in flags, unless re.A is set in the passed in flags. The flag docs should certinaly be updated to reflect this. -- nosy: +r.david.murray stage: -> needs patch versions: +Python 3.3 _

[issue14250] regex.flags is never equal to 0

2012-03-10 Thread py.user
New submission from py.user : http://docs.python.org/py3k/library/re.html#re.regex.flags "or 0 if no flags were provided" >>> import re >>> p = re.compile(r'', 0) >>> p.flags 32 >>> -- assignee: docs@python components: Documentation, Regular Expressions messages: 155362 nosy: docs@pytho

[issue12568] Add functions to get the width in columns of a character

2012-03-10 Thread poq
poq added the comment: It seems this is a bit of a minefield... GNOME Terminal/libvte has an environment variable (VTE_CJK_WIDTH) to override the handling of ambiguous width characters. It bases its default on the locale (with the comment 'This is basically what GNU libc does'). urxvt just u

[issue14242] Make subprocess.Popen aware of $SHELL

2012-03-10 Thread Gregory P. Smith
Gregory P. Smith added the comment: Users who want to use the SHELL environment variable can do so on their own by using it as their executable and constructing an appropriate command line. Allowing an environment variable to change the behavior of a program that assumes shell=True is going

[issue14229] On KeyboardInterrupt, the exit code should mirror the signal number

2012-03-10 Thread Arfrever Frehtes Taifersar Arahesis
Changes by Arfrever Frehtes Taifersar Arahesis : -- nosy: +Arfrever ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscri

[issue7652] Merge C version of decimal into py3k.

2012-03-10 Thread Arfrever Frehtes Taifersar Arahesis
Arfrever Frehtes Taifersar Arahesis added the comment: Please add --with-system-libmpdec (or --with-system-mpdecimal) option in `configure`, similarly to --with-system-expat and --with-system-ffi options. -- nosy: +Arfrever ___ Python tracker

[issue4761] create Python wrappers for openat() and others

2012-03-10 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Perhaps it is better not export these functions in the `os` module, leaving them in `posix`? In addition, `stat` and `lstat` is not very thin wrappers (especially on Windows) given that they are working with `bytes` and with `str`. --

[issue14249] unicodeobject.c: aliasing warnings

2012-03-10 Thread Stefan Krah
New submission from Stefan Krah : There are a couple of aliasing warnings in non-debug mode. For example: http://www.python.org/dev/buildbot/all/builders/x86%20Gentoo%20Non-Debug%203.x/builds/1741 Objects/object.c:293: warning: ignoring return value of 'fwrite', declared with attribute warn_u

[issue14242] Make subprocess.Popen aware of $SHELL

2012-03-10 Thread Arfrever Frehtes Taifersar Arahesis
Arfrever Frehtes Taifersar Arahesis added the comment: POSIX documents SHELL variable: http://pubs.opengroup.org/onlinepubs/9699919799/basedefs/V1_chap08.html -- nosy: +Arfrever ___ Python tracker

[issue14246] Accelerated ETree XMLParser cannot handle io.StringIO

2012-03-10 Thread Arfrever Frehtes Taifersar Arahesis
Changes by Arfrever Frehtes Taifersar Arahesis : -- nosy: +Arfrever ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscri

[issue14246] Accelerated ETree XMLParser cannot handle io.StringIO

2012-03-10 Thread Phil Thompson
Phil Thompson added the comment: This variation of your test doesn't... --- import io from xml.etree.ElementTree import parse stream = io.StringIO() stream.write(''' ''') stream.seek(0) parsed = parse(stream) print(parsed)

[issue14229] On KeyboardInterrupt, the exit code should mirror the signal number

2012-03-10 Thread Antoine Pitrou
Antoine Pitrou added the comment: > Since Python *does* handle the signal, and exits "regularly", we > shouldn't You are arguing from a legal point of view, but from a pratical point of view Python doesn't really "handle" the signal: it just defers the exit until after all internal structures

[issue14229] On KeyboardInterrupt, the exit code should mirror the signal number

2012-03-10 Thread Éric Araujo
Éric Araujo added the comment: The Debian bug has some more convincing examples: > any Python program which is expected to implement the interface of (say) > "diff" is buggy, because > it may exit status 1 ("comparison successful; differences found") when it > should have died with > SIGINT (

[issue14210] add filename completion to pdb

2012-03-10 Thread Roundup Robot
Roundup Robot added the comment: New changeset 01a25f638c83 by Georg Brandl in branch 'default': Close #14210: add command argument completion to pdb: complete file names, global/local variables, aliases http://hg.python.org/cpython/rev/01a25f638c83 -- nosy: +python-dev resolution: ->

[issue14242] Make subprocess.Popen aware of $SHELL

2012-03-10 Thread Éric Araujo
Éric Araujo added the comment: Note that it’s already possible to use any shell with the “executable” argument. Is there any official spec (i.e. POSIX) for the SHELL environment variable? -- nosy: +eric.araujo ___ Python tracker

[issue14242] Make subprocess.Popen aware of $SHELL

2012-03-10 Thread Antoine Pitrou
Changes by Antoine Pitrou : -- nosy: +gregory.p.smith versions: -Python 2.7, Python 3.1, Python 3.2, Python 3.4 ___ Python tracker ___ __

[issue14204] Support for the NPN extension to TLS/SSL

2012-03-10 Thread Colin Marc
Colin Marc added the comment: Here's the OpenSSL code I referenced for my implementation. It's an excerpt of ssl/lib_ssl.c, starting at line 1514. -- Added file: http://bugs.python.org/file24778/npn_openssl_ref.c ___ Python tracker

[issue14245] float rounding examples in FAQ are outdated

2012-03-10 Thread Zbyszek Szmek
Zbyszek Szmek added the comment: On 03/10/2012 07:52 PM, Martin v. Löwis wrote: >> - explain ``1.2`` example a bit more > > +1 for giving the binary representation; -1 for rounding > the decimal version of it. Oh, 1.1999555910790149937383830547332763671875 is exactly equal to 1.001

[issue14248] Typo in "What’s New In Python 3.3": "comparaison"

2012-03-10 Thread Roundup Robot
Roundup Robot added the comment: New changeset 9afbb3af1693 by Georg Brandl in branch 'default': Close #14248: fix typo. http://hg.python.org/cpython/rev/9afbb3af1693 -- nosy: +python-dev resolution: -> fixed stage: -> committed/rejected status: open -> closed ___

[issue14248] Typo in "What’s New In Python 3.3": "comparaison"

2012-03-10 Thread Jakub Wilk
New submission from Jakub Wilk : Typo in Doc/whatsnew/3.3.rst: "comparaison" -> "comparison". -- assignee: docs@python components: Documentation messages: 155347 nosy: docs@python, jwilk priority: normal severity: normal status: open title: Typo in "What’s New In Python 3.3": "comparaiso

[issue12568] Add functions to get the width in columns of a character

2012-03-10 Thread Tom Christiansen
Tom Christiansen added the comment: >Martin v. L=C3=B6wis added the comment: >> I would encourage you to look at the Perl CPAN module Unicode::LineBreak, >> which fully implements tr11. >Thanks for the pointer! >> If you'd like, I can show you a program that uses these, a rewrite the >> stan

[issue12568] Add functions to get the width in columns of a character

2012-03-10 Thread Antoine Pitrou
Changes by Antoine Pitrou : -- resolution: works for me -> status: closed -> open ___ Python tracker ___ ___ Python-bugs-list mailing

[issue12568] Add functions to get the width in columns of a character

2012-03-10 Thread Martin v . Löwis
Martin v. Löwis added the comment: > Don't we need a function that actually reports how curses is going to > print a given string, rather than just reporting what the unicode > standard says? That may be useful, but a) this patch doesn't provide that, and b) it may not actually possible to imp

[issue12568] Add functions to get the width in columns of a character

2012-03-10 Thread Tom Christiansen
Tom Christiansen added the comment: >Martin v. L=C3=B6wis added the comment: >> Martin, I think you meant to write "if w =3D=3D 'A':". >> Some very common characters have ambiguous widths though (e.g. the Greek = >alphabet), so you can't just raise an error for them. >That's precisely why I d

[issue12568] Add functions to get the width in columns of a character

2012-03-10 Thread Martin v . Löwis
Martin v. Löwis added the comment: > I would encourage you to look at the Perl CPAN module Unicode::LineBreak, > which fully implements tr11. Thanks for the pointer! > If you'd like, I can show you a program that uses these, a rewrite the > standard Unix fmt(1) filter that works properly on Un

[issue12568] Add functions to get the width in columns of a character

2012-03-10 Thread Martin v . Löwis
Martin v. Löwis added the comment: > Martin, I think you meant to write "if w == 'A':". > Some very common characters have ambiguous widths though (e.g. the Greek > alphabet), so you can't just raise an error for them. That's precisely why I don't think this should be in the library, but in th

[issue14245] float rounding examples in FAQ are outdated

2012-03-10 Thread Martin v . Löwis
Martin v. Löwis added the comment: > - explain ``1.2`` example a bit more +1 for giving the binary representation; -1 for rounding the decimal version of it. -- ___ Python tracker

[issue9154] Parser module doesn't understand function annotations.

2012-03-10 Thread Mark Dickinson
Changes by Mark Dickinson : -- versions: +Python 3.3 -Python 3.1 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue9232] Allow trailing comma in any function argument list.

2012-03-10 Thread Mark Dickinson
Changes by Mark Dickinson : -- assignee: mark.dickinson -> ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http

[issue4761] create Python wrappers for openat() and others

2012-03-10 Thread Benjamin Peterson
Benjamin Peterson added the comment: Addition/Substitution of None I think should be in a new issue. -- status: open -> closed ___ Python tracker ___

[issue14204] Support for the NPN extension to TLS/SSL

2012-03-10 Thread Sidney San Martín
Changes by Sidney San Martín : -- nosy: +ssm ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python

[issue14246] Accelerated ETree XMLParser cannot handle io.StringIO

2012-03-10 Thread Eli Bendersky
Eli Bendersky added the comment: Note that this code works fine: --- tree = ET.ElementTree() stream = io.BytesIO() stream.write(b''' ''') stream.seek(0) tree.parse(stream) print(tree.getroot()) --- -- _

[issue6147] multithreading.Pool.map() crashes Windows computer

2012-03-10 Thread Merlijn van Deen
Merlijn van Deen added the comment: Two questions: (1) can this be at least be added as a big fat warning in the documentation? (2) would it be a reasonable option to let either (a) the creation of a Pool (b) executing something using the Pool cause an exception when it happens during the im

[issue12568] Add functions to get the width in columns of a character

2012-03-10 Thread Nicholas Cole
Nicholas Cole added the comment: Marting and Poq: I think the sample code shows up a real problem. "Ambiguous" characters according to unicode may be rendered by curses in different ways. Don't we need a function that actually reports how curses is going to print a given string, rather than j

[issue14245] float rounding examples in FAQ are outdated

2012-03-10 Thread Zbyszek Szmek
Zbyszek Szmek added the comment: Proposed rewrite (building on Mark's version): - mention C doubles - explain ``1.2`` example a bit more """ Why are floating-point calculations inaccurate? --- Users are often surprised by results like this:: >>>

[issue14246] Accelerated ETree XMLParser cannot handle io.StringIO

2012-03-10 Thread Eli Bendersky
Eli Bendersky added the comment: Hi Phil, Could you please post the problematic code snippet that runs with 3.2 but not 3.3? Thanks in advance -- ___ Python tracker ___ _

[issue14204] Support for the NPN extension to TLS/SSL

2012-03-10 Thread Colin Marc
Colin Marc added the comment: Oops, I had my vim configured wrong and left a few tab characters in there. Here's another updated patch =) -- Added file: http://bugs.python.org/file24777/npn_patch_py3.diff ___ Python tracker

[issue14243] NamedTemporaryFile unusable under Windows

2012-03-10 Thread Dave Abrahams
Dave Abrahams added the comment: I disagree that it's unacceptable for close() and __del__() to behave differently. The acceptable difference would be that __del__() closes (if necessary) /and/ deletes the file on disk, while close() merely closes the file. If you can in fact "change the way

[issue14247] "in" operator doesn't return boolean

2012-03-10 Thread Georg Brandl
Georg Brandl added the comment: Chaining comparison operators inserts implicit "and" conditions: a OP b OP c OP d is equivalent to (a OP b) and (b OP c) and (c OP d) This is most useful with ==, <, <= and so forth, but "in" and "is" also count as comparison ops and have the same precede

[issue14247] "in" operator doesn't return boolean

2012-03-10 Thread Damjan Košir
New submission from Damjan Košir : In operator acts like it doesn't return a boolean value >>> 3 in [1,2,3] == True False and even >>> 3 in [1,2,3] == 3 in [1,2,3] False but somehow if you add ( ) it starts working >>> (3 in [1,2,3]) == True True Tested on OSX 10.7 Python 2.7.1 --

[issue7652] Merge C version of decimal into py3k.

2012-03-10 Thread Stefan Krah
Stefan Krah added the comment: Here's a new patch that addresses several remarks: o _decimal now has __floor__ and __ceil__methods. o libmpdec is now in a separate directory. o I removed the big libmpdec test suite. This is why: - It reduces the number of files that has been criti

[issue7652] Merge C version of decimal into py3k.

2012-03-10 Thread Stefan Krah
Stefan Krah added the comment: Here's a new patch that addresses several remarks: o _decimal now has __floor__ and __ceil__methods. o libmpdec is now in a separate directory. o I removed the big libmpdec test suite. This is why: - It reduces the number of files that has been criti

[issue7652] Merge C version of decimal into py3k.

2012-03-10 Thread Stefan Krah
Changes by Stefan Krah : Added file: http://bugs.python.org/file24776/9b3b1f5c4072.diff ___ Python tracker ___ ___ Python-bugs-list mailing lis

[issue13496] bisect module: Overflow at index computation

2012-03-10 Thread Raymond Hettinger
Raymond Hettinger added the comment: Thanks for the updated patch. -- ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubs

[issue4761] create Python wrappers for openat() and others

2012-03-10 Thread Georg Brandl
Georg Brandl added the comment: I agree about the constant AT_FDCWD. (At least, None should be allowed in addition.) Your other proposition would break the principle of very thin platform wrappers that we try to follow in posixmodule.c. -- status: closed -> open ___

[issue14204] Support for the NPN extension to TLS/SSL

2012-03-10 Thread Colin Marc
Colin Marc added the comment: Here's an updated patch against 3.3. -- Added file: http://bugs.python.org/file24775/npn_patch_py3.diff ___ Python tracker ___

[issue4761] create Python wrappers for openat() and others

2012-03-10 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Why use a special value AT_FDCWD instead of None? It is not Pythonish. Clearly, when it is used in C, but in dynamically typed Python we are not limited to only one C-type. Such a large number of new functions littering the namespace. Why not just add add

[issue12568] Add functions to get the width in columns of a character

2012-03-10 Thread Tom Christiansen
Tom Christiansen added the comment: I would encourage you to look at the Perl CPAN module Unicode::LineBreak, which fully implements tr11. It includes Unicode::GCString, a class that has a columns() method to determine the print columns. This is very fancy in the case of Asian widths, but of c

[issue12568] Add functions to get the width in columns of a character

2012-03-10 Thread poq
poq added the comment: Martin, I think you meant to write "if w == 'A':". Some very common characters have ambiguous widths though (e.g. the Greek alphabet), so you can't just raise an error for them. http://unicode.org/reports/tr11/ says: "Ambiguous characters occur in East Asian legacy chara

[issue13889] str(float) and round(float) issues with FPU precision

2012-03-10 Thread Mark Dickinson
Mark Dickinson added the comment: Patch looks fine to me. A couple of minor points (which I'm happy to fix at commit time if you agree, and don't want to create a new patch): - it looks to me as though the #ifdef _WIN32 isn't necessary any more; it's enough that we're on MSVC and that this

[issue14169] compiler.compile fails on "if" statement in attached file

2012-03-10 Thread Terry J. Reedy
Terry J. Reedy added the comment: I agree. 'deprecated' pretty much means "We do not think this is worth the effort of maintaining it. Don't use it unless it is already in old code." -- resolution: -> wont fix status: open -> closed ___ Python trac

[issue9574] allow whitespace around central '+' in complex constructor

2012-03-10 Thread Roundup Robot
Roundup Robot added the comment: New changeset 5a3c89337b50 by Mark Dickinson in branch '2.7': Closes #9574: Note that complex constructor doesn't allow whitespace around central operator. http://hg.python.org/cpython/rev/5a3c89337b50 New changeset a5b073b1cfea by Mark Dickinson in branch '3.2

[issue9574] allow whitespace around central '+' in complex constructor

2012-03-10 Thread Mark Dickinson
Mark Dickinson added the comment: Reclassifying as a doc issue; I don't think my proposed change is worth it. I'll submit some form of Jervis's docfix shortly. -- components: +Documentation -Interpreter Core priority: normal -> low ___ Python trac

[issue13496] bisect module: Overflow at index computation

2012-03-10 Thread Mark Dickinson
Mark Dickinson added the comment: Updated patch, with comment. -- Added file: http://bugs.python.org/file24774/issue13496_v2.patch ___ Python tracker ___ ___

[issue14243] NamedTemporaryFile unusable under Windows

2012-03-10 Thread Antoine Pitrou
Changes by Antoine Pitrou : -- nosy: +brian.curtin, tim.golden ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue14243] NamedTemporaryFile unusable under Windows

2012-03-10 Thread Antoine Pitrou
Antoine Pitrou added the comment: > OTOH, if the proposal is merely to change the way the file is opened > on Windows so that it can be opened again without closing it first, > that sounds fine. That would be my proposal. It probably needs getting rid of O_TEMPORARY, exposing CreateFile and _op

[issue14243] NamedTemporaryFile unusable under Windows

2012-03-10 Thread Nick Coghlan
Nick Coghlan added the comment: What's the proposal here? If delete is True, close() must delete the file. It is not acceptable for close() and __del__() to behave differently. OTOH, if the proposal is merely to change the way the file is opened on Windows so that it can be opened again witho

[issue14245] float rounding examples in FAQ are outdated

2012-03-10 Thread Martin v . Löwis
Martin v. Löwis added the comment: > I think it would be useful to mention explicitly that Python simply uses > the native floating-point implementation in hardware and thus behaves > very similarly to other languages which do this, for instance C or Java. > This should clear up a lot of the beh

[issue14245] float rounding examples in FAQ are outdated

2012-03-10 Thread Mark Dickinson
Mark Dickinson added the comment: > I think it would be useful to mention explicitly that Python simply uses > the native floating-point implementation in hardware and thus behaves > very similarly to other languages which do this, for instance C or Java. Agreed that it's useful to say somet

[issue12568] Add functions to get the width in columns of a character

2012-03-10 Thread Martin v . Löwis
Martin v. Löwis added the comment: Please see the attached width.py for an example -- Added file: http://bugs.python.org/file24773/width.py ___ Python tracker ___ __

[issue14245] float rounding examples in FAQ are outdated

2012-03-10 Thread Zbyszek Szmek
Zbyszek Szmek added the comment: [part mangled by the tracker] "> 1.1999555910790149937383830547332763671875 "> "> which is accurate to around 16 decimal digits.) It is easy to count, that exactly 17 digits are accurate. I have to admit, that I'm completely lost here --- why w

[issue14245] float rounding examples in FAQ are outdated

2012-03-10 Thread Zbyszek Szmek
Zbyszek Szmek added the comment: On 03/10/2012 12:26 PM, Mark Dickinson wrote: > > Mark Dickinson added the comment: > > Proposed rewrite: Hi, thanks for the quick reply. If we were to rewrite the whole entry, some more changes could be done: I think it would be useful to mention explicitly

[issue14246] Accelerated ETree XMLParser cannot handle io.StringIO

2012-03-10 Thread Martin v . Löwis
Changes by Martin v. Löwis : -- nosy: +eli.bendersky ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mai

[issue14245] float rounding examples in FAQ are outdated

2012-03-10 Thread Martin v . Löwis
Martin v. Löwis added the comment: +1 -- nosy: +loewis ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://

[issue14243] NamedTemporaryFile unusable under Windows

2012-03-10 Thread Antoine Pitrou
Antoine Pitrou added the comment: This is quite silly indeed, and is due to the use of O_TEMPORARY in the file creation flags. -- nosy: +ncoghlan, pitrou title: NamedTemporaryFile usability request -> NamedTemporaryFile unusable under Windows type: -> behavior versions: +Python 3.2,

[issue14169] compiler.compile fails on "if" statement in attached file

2012-03-10 Thread Mark Dickinson
Mark Dickinson added the comment: Okay, so the issue is simply that the compiler module doesn't have logic for emitting the EXTENDED_ARGS[1] bytecode instruction to properly deal with a jump target that won't fit in two bytes. Given that the compiler module is deprecated, I propose closing t

[issue12568] Add functions to get the width in columns of a character

2012-03-10 Thread Nicholas Cole
Nicholas Cole added the comment: Martin: sorry to be completely dense, but I can't get this to work properly with the python3.3a1 build. Could you post some example code? -- ___ Python tracker __

[issue14169] compiler.compile fails on "if" statement in attached file

2012-03-10 Thread Mark Dickinson
Mark Dickinson added the comment: D'oh. Ignore that last message; all it shows is that I'm stupid. -- ___ Python tracker ___ ___ P

[issue14169] compiler.compile fails on "if" statement in attached file

2012-03-10 Thread Mark Dickinson
Mark Dickinson added the comment: Interestingly, dis.dis also fails to decompile the .pyc bytecode generated by importing the file. (This was after adding dummy AddUnit, MakeCustomaryToBase and MakeBaseToCustomary definitions to the top of the file to prevent the import raising an exception.

[issue14169] compiler.compile fails on "if" statement in attached file

2012-03-10 Thread Mark Dickinson
Mark Dickinson added the comment: Here's the trackback I get with Python 2.7. Look's like something's assuming that POP_JUMP_IF_FALSE target of 65541 fits in 16 bits. Python 2.7.2 (default, Jan 13 2012, 17:11:09) [GCC 4.2.1 (Apple Inc. build 5666) (dot 3)] on darwin Type "help", "copyright"

[issue14245] float rounding examples in FAQ are outdated

2012-03-10 Thread Mark Dickinson
Mark Dickinson added the comment: Proposed rewrite: Why are floating point calculations inaccurate? --- Users are often surprised by results like this:: >>> 1.2 - 1.0 0.16 and think it is a bug in Python. It's not. This h

[issue14245] float rounding examples in FAQ are outdated

2012-03-10 Thread Mark Dickinson
Mark Dickinson added the comment: Agreed. Do you have a suggested rewrite? That faq entry could be improved significantly in many ways; the tutorial material is much better. I'm wondering whether it would be better to cut down the FAQ to much something much briefer, and leave the link to t

[issue14246] Accelerated ETree XMLParser cannot handle io.StringIO

2012-03-10 Thread Phil Thompson
New submission from Phil Thompson : The old unaccelerated ETree XMLParser accepts input from a io.StringIO, but the accelerated version does not. Any code that relies on this is broken by Python v3.3. -- components: XML messages: 155301 nosy: philthompson10 priority: normal severity: n

[issue14245] float rounding examples in FAQ are outdated

2012-03-10 Thread Zbyszek Szmek
New submission from Zbyszek Szmek : http://docs.python.org/dev/faq/design.html#why-are-floating-point-calculations-so-inaccurate This whole paragraph is wrong since #9337 (Make float.__str__ behave identically to float.__repr__). """ The str() function prints fewer digits and this often results

[issue14244] No information about behaviour with groups in pattern in the docstring for re.split

2012-03-10 Thread py.user
py.user added the comment: "+returning a list containing the resulting substrings. If +capturing parentheses are used in pattern, then the text of all +groups in the pattern are also returned as part of the resulting +list." not only text >>> import re >>> re.split(r'(a)(x)?',

[issue14244] No information about behaviour with groups in pattern in the docstring for re.split

2012-03-10 Thread Georg Brandl
Georg Brandl added the comment: Thank you, should be fixed now. -- nosy: +georg.brandl stage: committed/rejected -> ___ Python tracker ___ _

[issue14186] Link to PEP 3107 in "def" part of Language Reference

2012-03-10 Thread Roundup Robot
Roundup Robot added the comment: New changeset c18d538d2ece by Georg Brandl in branch '3.2': Closes #14186: add link to PEP 3107 (function annotations) to the function definition section. http://hg.python.org/cpython/rev/c18d538d2ece -- nosy: +python-dev resolution: -> fixed stage: -

[issue14244] No information about behaviour with groups in pattern in the docstring for re.split

2012-03-10 Thread Roundup Robot
Roundup Robot added the comment: New changeset b96251d9f36a by Georg Brandl in branch '3.2': Closes #14244: add info about capturing groups and maxsplit to the docstring of re.split(). http://hg.python.org/cpython/rev/b96251d9f36a -- nosy: +python-dev resolution: -> fixed stage: -> c