[issue10562] Change 'j' for imaginary unit into an 'i'
Mark Dickinson dicki...@gmail.com added the comment: Whether 1+2j is a literal or an expression is debatable. Really? I can't imagine what basis you'd have for calling either 1+2j or +1 a literal. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue10562 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue10614] ZipFile and CP932 encoding
Amaury Forgeot d'Arc amaur...@gmail.com added the comment: The ZIP format specification mentions only cp437 and utf8: http://www.pkware.com/documents/casestudies/APPNOTE.TXT see Apeendix D. Do zip files created on Japanese Windows contain some information about the encoding they use? Or do some programs write cp932 where they are supposed to use one of the encodings above? -- nosy: +amaury.forgeotdarc ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue10614 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue10614] ZipFile and CP932 encoding
Martin v. Löwis mar...@v.loewis.de added the comment: No, there is no indication in the zipfile that it deviates from the spec. That doesn't stop people from creating such zipfiles, anyway; many zip tools ignore the spec and use instead CP_ACP (which, of course, will then get misinterpreted if extracted on a different system). I think we must support this case somehow, but must be careful to avoid creating such files unless explicitly requested. One approach might be to have two encodings given: one to interpret the existing filenames, and one to be used for new filenames (with a recommendation to never use that parameter since zip now supports UTF-8 in a well-defined manner). -- nosy: +loewis ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue10614 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue10365] IDLE Crashes on File Open Dialog when code window closed before other file opened
William Barr webmaster...@gmail.com added the comment: Ok, attached is a patch that should make IDLE silently ignore this happening; upon looking into this, it was a rather trivial fix. The open function was waiting on the return input from the askopenfile call, during which the calling window was closed, setting the editwin parameter to None according to close. The patch just adds another try/except to catch the AttributeError raised when the non-extant editwin's flist is referenced. I did come up with a method to actually make it continue with the opening process (just save a copy of the editwin's flist before the askopenfile call, during which the editwin gets closed), but that seemed a bit kludgey and possibly dangerous;, however it *seems* to work without issue. I can upload that patch as well if anyone would care to review it in addition to the attached patch. -- keywords: +patch Added file: http://bugs.python.org/file19922/issue10365.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue10365 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue3132] implement PEP 3118 struct changes
Mark Dickinson dicki...@gmail.com added the comment: For reference, Numpy's PEP 3118 implementation is here: Thanks for that, and the other information you give; that's helpful. It sounds like we're on the same page with respect to alignment of substructs. (Bar the mostly academic question of max versus lcm.) I still like the idea of scoped endianness markers in the substructs, but if we have to abandon that for compatibility with NumPy that's okay. - I assumed the 'O' format in the PEP is supposed to be similar to Numpy object arrays. This implies some reference counting semantics. The Numpy PEP 3118 implementation assumes the memory contains borrowed references, valid at least until the buffer is released. Unpacking 'O' should probably INCREF whatever PyObject* pointer is there. I'm still confused about how this could work: when unpacking, how do you know whether the PyObject* pointer points to a valid object or not? You can ensure that the pointer will always point to a valid object by having the *pack* operation increment reference counts, but then you need a way to automatically decref when the packed string goes out of scope. So the object returned by 'pack' would somehow have to be something other than a plain string, so that it can deal with automatically doing the DECREF of the held PyObject* pointers when it goes out of scope. What's the need to have the 'O' format in the struct module? Is it really necessary there? Can we get away with not implementing it? -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue3132 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue3132] implement PEP 3118 struct changes
Mark Dickinson dicki...@gmail.com added the comment: For reference, Numpy's PEP 3118 implementation is here BTW, does this already exist in a released version of NumPy? If not, when is it likely to appear in the wild? -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue3132 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue7475] codecs missing: base64 bz2 hex zlib hex_codec ...
Marc-Andre Lemburg m...@egenix.com added the comment: Alexander Belopolsky wrote: Alexander Belopolsky belopol...@users.sourceforge.net added the comment: I am probably a bit late to this discussion, but why these things should be called codecs and why should they share the registry with the encodings? It looks like the proper term would be transformations or transforms. .transform() is just the name of the method. The codecs are still just that: codecs, i.e. objects that encode and decode data. The types they support are defined by the codecs, not by the helper methods. In Python3, the str and bytes methods .encode() and .decode() will only support str-bytes-str conversions. The new str and bytes .transform() method adds back str-str and bytes-bytes. The codec subsystem does not impose restrictions on the type combinations a codec can support, and that's per design. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue7475 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue10365] IDLE Crashes on File Open Dialog when code window closed before other file opened
Terry J. Reedy tjre...@udel.edu added the comment: The indentation of the patch 'looks' wrong. That appears to be because you used tabs instead of spaces (as in the lines removed and I presume elsewhere in the file -- and because FireFox interprets tabs as 8 spaces. Please redo with spaces. I will try to look at it during 3.2 beta phase if no one beats me to it. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue10365 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue10562] Change 'j' for imaginary unit into an 'i'
Georg Brandl ge...@python.org added the comment: An imaginary basis maybe? -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue10562 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue10610] Correct the float(), int() and complex() documentation
Marc-Andre Lemburg m...@egenix.com added the comment: Alexander Belopolsky wrote: Alexander Belopolsky belopol...@users.sourceforge.net added the comment: Should we also review the documentation for fractions and decimals? For example, fractions are documented as accepting strings of decimal digits, but given that we have presumably non-identical str.isdigit() and str.isdecimal() methods, the above definition begs a question whether accepted strings should be digits, decimals or both? The term decimal digit is defined in the Unicode standard as those code points having the category Ld. See http://www.unicode.org/versions/Unicode5.2.0/ch04.pdf The methods .isdecimal(), .isdigit() and .isnumeric() check the availability the resp. field entries 6, 7 and 8 in the UCD See http://www.unicode.org/reports/tr44/#Numeric_Type for details and http://www.unicode.org/Public/6.0.0/ucd/extracted/DerivedNumericType.txt for the full list of code points with these fields set. The docs for those methods need to be updated as well. Doing this for .isdigit() and .isnumeric() is a bit difficult, though, since the code points don't fall into just a single category. The best option is to refer to the code point properties Numeric_Type=Decimal for .isdecimal(), Numeric_Type=Digit for .isdigit() and Numeric_Type=Numeric for .isnumeric(). The resp. numeric values are available via the unicodedata module. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue10610 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue10610] Correct the float(), int() and complex() documentation
Marc-Andre Lemburg m...@egenix.com added the comment: Raymond Hettinger wrote: Raymond Hettinger rhettin...@users.sourceforge.net added the comment: Try not to sprawl this all over the docs. Find the most common root and document it there. No need to garbage-up Fractions, Decimal etc. with something that is of zero interest to 99.9% of users. That's a good idea. It may be enough to just add a new unicode_decimal_digit ::= ... to the language spec (even if it is not used there) and then reference it from the other parts of the docs. Same for unicode_digit and unicode_numeric. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue10610 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue10528] argparse uses %s in gettext calls
Steven Bethard steven.beth...@gmail.com added the comment: If I understand it right, before this patch, people couldn't really supply internationalizations for these calls - they would have had to have a translation for each possible value of, e.g. action.choices or parser.prefix_chars. So I think there's pretty minimal danger of breaking that code. Specific comments on names in the patch: * rename %(character) to %(prefix_chars) * rename %(name) to %(type) and %(arg_string) to %(value) * rename %(program_name) to %(prog) Basically, we should use the name of an Action or ArgumentParser attribute whenever it makes sense. Hopefully that will make it more intuitive what these mean when people are translating them. And yes, with the above changes, +1. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue10528 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue10562] Change 'j' for imaginary unit into an 'i'
Boštjan Mejak bostjan.me...@gmail.com added the comment: The result of 1 + 2j cannot be further broken down, so the result stays as 1 + 2j (note the spaces!). (1+2j) (1 + 2j) Following PEP 8 in this regard is also needed. Abandon the request of adding the i unit and rather fix this spacing issue. The complex() built-in function should also be fixed to add spaces around operators. -- Added file: http://bugs.python.org/file19923/unnamed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue10562 ___The result of 1 + 2j cannot be further broken down, so the result stays as 1 + 2j (note the spaces!).divbr/divdivNo:/divdivdivgt;gt;gt; 1 + 2j/divdiv(1+2j)/div/divdivbr/divdivYes:/divdiv divgt;gt;gt; 1 + 2j/divdiv(1 + 2j)/div/divdivbr/divdivbr/divdivFollowing PEP 8 in this regard is also needed. Abandon the request of adding the i unit and rather fix this spacing issue. The complex() built-in function should also be fixed to add spaces around operators./div ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue10528] argparse uses %s in gettext calls
Steven Bethard steven.beth...@gmail.com added the comment: Hmm. I see I confused this with Issue 10529, where there really was a bug in the gettext calls. Nonetheless, +1 for switching from %s to %(xxx)s in 3.2 - since that's the first release in Python 3 that has argparse, I think it's really okay to do this. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue10528 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue10497] Incorrect use of gettext in argparse
Steven Bethard steven.beth...@gmail.com added the comment: Yes, I think it's okay to fix this without a test, given that it's a nontrivial amount of work to test gettext stuff. I'd rather have it working now, without tests, than wait until we know how to test stuff with gettext. It's also a pretty minor, obvious fix. Of course, I assume you'll make sure this also merges correctly with your Issue 10528 patch. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue10497 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue2001] Pydoc interactive browsing enhancement
Nick Coghlan ncogh...@gmail.com added the comment: Committed in r86962. Thanks to all involved in getting this from initial submission to final checkin :) Any further changes (including addressing Éric's last few comments) can be undertaken as separate issues. -- resolution: - accepted stage: patch review - committed/rejected status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue2001 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue2001] Pydoc interactive browsing enhancement
Nick Coghlan ncogh...@gmail.com added the comment: Oh, I also fixed in issue in both the old and new server code that switched warnings off globally rather than merely for the operation it was trying to disable warnings for. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue2001 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue10562] Change 'j' for imaginary unit into an 'i'
Robert Lehmann lehman...@gmail.com added the comment: I wonder whether there are many examples where scientific data is written in a form that Python's complex() constructor couldn't currently read, but would be able to read if it accepted 'i' in place of 'j'. I could not reproduce widespread real world issues with the syntax as it stands using Google Code Search (a mere 4 unique hits). http://goo.gl/sqMhY -- nosy: +lehmannro ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue10562 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue10557] Malformed error message from float()
Changes by STINNER Victor victor.stin...@haypocalc.com: -- nosy: -haypo ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue10557 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue10562] Change 'j' for imaginary unit into an 'i'
Mark Dickinson dicki...@gmail.com added the comment: Thanks for that, Robert. Actually, I find those few results quite convincing as evidence that it would be useful to support 'i' (and 'I') on input. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue10562 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue10549] help(cls1) breaks when cls1 has staticmethod(cls2) attribute
Georg Brandl ge...@python.org added the comment: Fixed in r86964. -- nosy: +georg.brandl resolution: - fixed status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue10549 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue10557] Malformed error message from float()
Mark Dickinson dicki...@gmail.com added the comment: Are you sure ? I'm not sure how the underlying PyOS_string_to_double() (IIRC) works. I believe it accepts ASCII whitespace (i.e., chars ' ', '\t', '\f', '\n', '\r', '\v'), and nothing else. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue10557 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue8989] email.utils.make_msgid: specify domain
Adrian von Bidder avbid...@fortytwo.ch added the comment: On Thursday 02 December 2010 22.51:51 you wrote: Committed to py3k in r86936 with minor fixups. thanks, great! (Wheee! my first patch to Python ;-) cheers -- vbi -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue8989 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue10576] Add a progress callback to gcmodule
Robert Lehmann lehman...@gmail.com added the comment: A few issues I'd like to raise: (1) Multiple callback chains. Is there any code in your existing use case of GC callbacks where you don't check for the phase argument and follow different code paths depending on it? If not, having two callback chains should be fine and takes the burden from the programmer to the implementors. (This is feasible if we *only ever* have two values for the phase.) (2) Single collections. Currently, neither PyGC_Collect nor gc.collect() invoke the callbacks (since they do not call collect_generations). Is this an oversight or intentional? (3) Error checking. What about callbacks which are bound to fail on each and every invocation, ie. because of wrong signatures. Should these be flat-out rejected in some way *on registration*, automagically removed when first encountered, or are we okay with errors slammed into the user's face every so often because he should REALLY fix them? (4) Interop. Can this be supported as easily on other VMs? (That's perhaps a good reason for the statistics to be a dict, for GCs providing vastly different amounts of information.) -- nosy: +lehmannro ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue10576 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue10576] Add a progress callback to gcmodule
Kristján Valur Jónsson krist...@ccpgames.com added the comment: 1) I'm not sure what you are asking. Does anyone think that it is simpler to register two different callbacks than one? IMHO it complicates the interface and creates so many oppertunities to do things incorrectly. 2)No, it is an oversight, let me verify the code. 3)I don't think we ought to be smart and try to remove callbacks. I don't think that is common practice, the developer will know soon enough if things don't work. Just keep it simple. 4)Interop, I think, is not an issue. the gc module is a C-Python only implementation detail. Every implementation has the freedom to collect garbage in its own way. I'll post an updated version soon. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue10576 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue3132] implement PEP 3118 struct changes
Pauli Virtanen p...@iki.fi added the comment: I still like the idea of scoped endianness markers in the substructs, but if we have to abandon that for compatibility with NumPy that's okay. That, or change the Numpy implementation. I don't believe there's yet much code in the wild that changes the alignment specifier on the fly. [clip: 'O' format code] So the object returned by 'pack' would somehow have to be something other than a plain string, so that it can deal with automatically doing the DECREF of the held PyObject* pointers when it goes out of scope. Yes, the packed object would need to own the references, and it would be the responsibility of the provider of the buffer to ensure that the pointers are valid. It seems that it's not possible for the `struct` module to correctly implement packing for the 'O' format. Unpacking could be possible, though (but then if you don't have packing, how write tests for it?). Another possibility is to implement the 'O' format unsafely and leave managing the reference counting to whoever uses the `struct` module's capabilities. (And maybe return ctypes pointers on unpacking.) [clip] What's the need to have the 'O' format in the struct module? Is it really necessary there? Can we get away with not implementing it? Numpy arrays, when containing Python objects, function as per the 'O' format. However, for the struct module, I don't see what would be the use case for the 'O' format. BTW, does this already exist in a released version of NumPy? If not, when is it likely to appear in the wild? It's included since the 1.5.0 release which came out last July. *** I think after the implementation is done, the PEP probably needs to be amended with clarifications (and possibly cutting out what is not really needed). -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue3132 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue2001] Pydoc interactive browsing enhancement
Georg Brandl ge...@python.org added the comment: The html_getfile() function is Unix-specific: it constructs paths like path = os.sep + path.replace('%20', ' ') Consequently, its test fails on Windows: http://www.python.org/dev/buildbot/all/builders/x86%20XP-4%203.x/builds/3703/steps/test/logs/stdio -- keywords: +buildbot -patch status: closed - open ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue2001 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue2001] Pydoc interactive browsing enhancement
Changes by Giampaolo Rodola' g.rod...@gmail.com: -- nosy: -giampaolo.rodola ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue2001 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue8525] Display exception's subclasses in help()
Rob Cliffe rob.cli...@btinternet.com added the comment: Originally I only had built-in classes in mind (with Exceptions being IMO the most obvious example of a built-in class hierarchy that it is useful to find your way around). But if the idea can be extended to other classes, well, great. Rob Cliffe -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue8525 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue10363] Embedded python, handle (memory) leak
Changes by Steven Youngs st...@youngs.cc: -- nosy: +StevenY ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue10363 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue10614] ZipFile and CP932 encoding
STINNER Victor victor.stin...@haypocalc.com added the comment: @Hirokazu: Can you attach a small test archive? Yes, we can add a default_encoding attribute to ZipFile and add an optional default_encoding argument to its constructor. -- nosy: +haypo ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue10614 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue10557] Malformed error message from float()
Eric Smith e...@trueblade.com added the comment: According to comments in the code and verified by inspection, PyOS_string_to_double does not accept any whitespace. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue10557 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue2001] Pydoc interactive browsing enhancement
Éric Araujo mer...@netwok.org added the comment: Nick, you seem to have forgotten to svn add the CSS file. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue2001 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue10197] subprocess.getoutput fails on win32
STINNER Victor victor.stin...@haypocalc.com added the comment: -def getstatusoutput(cmd): +def getstatusoutput(cmd, shell=True): shell=True is dangerous, it can lead to shell command injection. I would prefer to set its default value to False. The function already exists in Python 3.1, but it is not used in Python source code. Is it too late to fix its API to avoid security vulnerabilities? -- nosy: +haypo ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue10197 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue10497] Incorrect use of gettext in argparse
Éric Araujo mer...@netwok.org added the comment: From the other bug: “If I understand it right, before this patch, people couldn't really supply internationalizations for these calls - they would have had to have a translation for each possible value of, e.g. action.choices or parser.prefix_chars.” Exactly. I will commit this evening and refresh the other patch (there is one overlapping change). -- priority: normal - high status: open - pending ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue10497 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue10528] argparse uses %s in gettext calls
Éric Araujo mer...@netwok.org added the comment: This bug is a warning, not a fatal error: “The translator cannot reorder the arguments.” Depending on the language, it may be a real pain. “Basically, we should use the name of an Action or ArgumentParser attribute whenever it makes sense. Hopefully that will make it more intuitive what these mean when people are translating them.” Exactly. That’s why I suggested %(program_name) instead of %(prog); keep in mind translators are not necessarily programmers, so the familiar argparse terms may not make sense to them. If Georg is okay with the lack of tests (apart manual testing showing that xgettext does not print warnings anymore), I will apply your changes and commit this tonight, which should be in time for beta1. -- dependencies: +Incorrect use of gettext in argparse priority: normal - high stage: needs patch - commit review status: open - pending ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue10528 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue10562] Change 'j' for imaginary unit into an 'i'
Éric Araujo mer...@netwok.org added the comment: I can't imagine what basis you'd have for calling either 1+2j or +1 a literal. Poor understanding of the parser/tokenizer/formal grammar. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue10562 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue10615] Trivial mingw compile fixes
New submission from Johann Hanne pyt...@jf.hanne.name: Some C files fail to compile with mingw, mostly due to missing preprocessor statements: - Modules/_ctypes/callproc.c When using the bundled non-msvc libffi, ffi_call has no return value, so only use it when compiled with msvc. - Modules/_pickle.c There are Windows data types FLOAT, INT, LONG which the pickle code conflicts with. - Modules/posixmodule.c Some #ifdef _MSC_VER paragraphs apply for __MINGW32__ as well; for MinGW, wincrypt.h must be explicitely included (the original Windows headers include them in windows.h) - Modules/signalmodule.c On case-sensitive filesystems, windows.h must be all-lowercase - Modules/socketmodule.h MinGW does not define SIO_KEEPALIVE_VALS, so do it here if required - PC/msvcrtmodule.c MinGW does not have crtdbg.h - PC/winreg.c MinGW does not define REG_LEGAL_CHANGE_FILTER, so do it here if required - Python/dynload_win.c strcasecmp is already defined with MinGW, so use a private name - Python/pythonrun.c MinGW has locale.h, but not langinfo.h This patch fixes all the mentioned problems. -- components: Build files: Python-3.1.3.fix_mingw_compile.diff keywords: patch messages: 123236 nosy: jonny priority: normal severity: normal status: open title: Trivial mingw compile fixes type: compile error versions: Python 3.1 Added file: http://bugs.python.org/file19924/Python-3.1.3.fix_mingw_compile.diff ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue10615 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue10562] Change 'j' for imaginary unit into an 'i'
Changes by Éric Araujo mer...@netwok.org: Removed file: http://bugs.python.org/file19923/unnamed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue10562 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue10197] subprocess.getoutput fails on win32
Éric Araujo mer...@netwok.org added the comment: The function already exists in Python 3.1, but it is not used in Python source code We don’t know what code out there uses. This would be an incompatible change. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue10197 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue10478] Ctrl-C locks up the interpreter
STINNER Victor victor.stin...@haypocalc.com added the comment: Dummy question: why don't you use KeyboardInterrupt instead of a custom SIGINT handler? try: for i in range(100): print(i) except KeyboardInterrupt: print(got sigint) Python SIGINT handler raises a KeyboardInterrupt (the handler is written in C, not in Python) which is safe, whereas writing to sys.stdout doesn't look to be a good idea :-) -- nosy: +haypo ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue10478 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue10557] Malformed error message from float()
Mark Dickinson dicki...@gmail.com added the comment: According to comments in the code and verified by inspection, PyOS_string_to_double does not accept any whitespace. Bah. You're right, of course. :-) Any whitespace (post PyUnicode_EncodeDecimal) is handled in PyFloat_FromString, using Py_ISSPACE. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue10557 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue10478] Ctrl-C locks up the interpreter
STINNER Victor victor.stin...@haypocalc.com added the comment: This issue remembers me #3618 (opened 2 years ago): I proposed to use RLock instead of Lock, but RLock was implemented in Python and were too slow. Today, we have RLock implemented in C and it may be possible to use them. Would it solve this issue? -- There are at least two deadlocks, both in _bufferedwriter_flush_unlocked(): - call to _bufferedwriter_raw_write() - call to PyErr_CheckSignals() The lock is precisely there so that the buffered object doesn't have to be MT-safe or reentrant. It doesn't seem reasonable to attempt to restore the file to a stable state in the middle of an inner routine. Oh, so release the lock around the calls to _bufferedwriter_raw_write() (aorund PyObject_CallMethodObjArgs() in _bufferedwriter_raw_write()) and PyErr_CheckSignals() is not a good idea? Or is it just complex because the buffer object have to be in a consistent state? (in a more sophisticated version, we could store pending writes so that they get committed at the end of the currently executing write) If the pending write fails, who gets the error? -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue10478 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue10478] Ctrl-C locks up the interpreter
STINNER Victor victor.stin...@haypocalc.com added the comment: This issue remembers me #3618 (opened 2 years ago): I proposed to use RLock instead of Lock, but RLock was implemented in Python and were too slow. Today, we have RLock implemented in C and it may be possible to use them. Would it solve this issue? -- There are at least two deadlocks, both in _bufferedwriter_flush_unlocked(): - call to _bufferedwriter_raw_write() - call to PyErr_CheckSignals() The lock is precisely there so that the buffered object doesn't have to be MT-safe or reentrant. It doesn't seem reasonable to attempt to restore the file to a stable state in the middle of an inner routine. Oh, so release the lock around the calls to _bufferedwriter_raw_write() (aorund PyObject_CallMethodObjArgs() in _bufferedwriter_raw_write()) and PyErr_CheckSignals() is not a good idea? Or is it just complex because the buffer object have to be in a consistent state? (in a more sophisticated version, we could store pending writes so that they get committed at the end of the currently executing write) If the pending write fails, who gets the error? -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue10478 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue10478] Ctrl-C locks up the interpreter
Changes by STINNER Victor victor.stin...@haypocalc.com: -- Removed message: http://bugs.python.org/msg123242 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue10478 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue10478] Ctrl-C locks up the interpreter
STINNER Victor victor.stin...@haypocalc.com added the comment: Ok, so +1 to apply immediatly your patch which fixes the deadlock. If someone is motived to make Buffered* classes reentrant, (s)he can remove this exception. io and signal documentation should also be improved to indicate that using buffered I/O in a signal handler may raise a RuntimeError on reentrant call (and give an example to explain the problem?). About the patch: can't you move (self-owner = PyThread_get_thread_ident(), 1) ) in _enter_buffered_busy()? -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue10478 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue10562] Change 'j' for imaginary unit into an 'i'
Boštjan Mejak bostjan.me...@gmail.com added the comment: Please make the tokenizer surround spaces around operators. So the output would be like in the example below: (1 + 2j) (1 + 2j) -- Added file: http://bugs.python.org/file19925/unnamed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue10562 ___divPlease make the tokenizer surround spaces around operators. So the output would be like in the example below:/div div /div divgt;gt;gt; 1 + 2jbr(1 + 2j)/div div /div divAlso this:/div divgt;gt;gt; 1+2jbr(1 + 2j)/div ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue10562] Change 'j' for imaginary unit into an 'i'
Changes by Brian Curtin cur...@acm.org: -- nosy: -brian.curtin ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue10562 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue10197] subprocess.getoutput fails on win32
R. David Murray rdmur...@bitdance.com added the comment: Ah, I did not realize that getstatusoutput was implemented using os.popen. I thought it already used Popen. Now, in python3, os.popen is in turn implemented using subprocess.Popen, so removing that level of indirection seems sensible. The question that remains is, does removing the {} change the output obtained from a command sequence in any way? Note that for backward compatibility you will need to re-munge the status code into C format. Which makes me wonder if getoutput/getstatusoutput should just be documentationally deprecated instead. (I never use them myself, FWIW) -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue10197 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue1486713] HTMLParser : A auto-tolerant parsing mode
R. David Murray rdmur...@bitdance.com added the comment: A note for the curious: I changed the keyword name from 'tolerant' to 'strict' because the stdlib has other examples of 'strict' as a keyword, but the word 'tolerant' appears nowhere in the documentation and certainly not as a keyword. So it seemed better to remain consistent with existing practice. This would be even better if the default value of 'strict' was False, but unfortunately we can't do that. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue1486713 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue2380] Raise a Py3K warning for catching nested tuples with non-BaseException exceptions
Antoine Pitrou pit...@free.fr added the comment: Not all incompatibilities have to raise a py3k warnings; AFAIK, only those which are not handled by 2to3 do. -- nosy: +benjamin.peterson, pitrou ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue2380 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue10360] _weakrefset.WeakSet.__contains__ should not propagate TypeErrors
Tres Seaver tsea...@agendaless.com added the comment: This fix needs backporting to the 3.1 and 2.7 branches as well. -- status: closed - open ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue10360 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue2690] Precompute range length and enhance range subscript support
Nick Coghlan ncogh...@gmail.com added the comment: I brought the patch up to date for the Py3k branch, but realised just before checking it in that it may run afoul of the language moratorium (since it alters the behaviour of builtin range objects). However, the .count() and .index() methods (along with the Sequence ABC registration) as well as the O(1) containment testing for integers were already put in place. (I also noticed that the new methods from issue #9213 are not mentioned in the range() docs, unlike the O(1) optimisation) I've gone ahead and checked it in as r86970, as I see this patch as filling out the promise of the Sequence ABC registration by adding support for slicing and negative indices (with the length caching as more of an implementation detail). However, I'm also leaving the tracker issue open and assigning to Georg in case he wants to revert it before the beta goes out. Note that I also fixed the patch so that OverflowError occurs only when encountering an affected operation (primarily indexing and retrieval of the length). If you don't do any of those things, you can make your ranges as large as you like. (The indexing could fairly easily be fixed to eliminate the overflow errors - I just didn't do it in this patch, since it is a separate problem). -- assignee: - georg.brandl nosy: +georg.brandl resolution: - accepted stage: patch review - committed/rejected title: Precompute range length - Precompute range length and enhance range subscript support Added file: http://bugs.python.org/file19926/issue2690_lazy_overflow_check.diff ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue2690 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue2001] Pydoc interactive browsing enhancement
Nick Coghlan ncogh...@gmail.com added the comment: Added the missing CSS file in r86971. Hopefully that will make the buildbots a little happier. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue2001 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue10360] _weakrefset.WeakSet.__contains__ should not propagate TypeErrors
Georg Brandl ge...@python.org added the comment: Don't worry, it will be ported. -- status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue10360 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue10562] Change 'j' for imaginary unit into an 'i'
Changes by Georg Brandl ge...@python.org: -- nosy: -georg.brandl ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue10562 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue10562] Change 'j' for imaginary unit into an 'i'
Changes by Georg Brandl ge...@python.org: Removed file: http://bugs.python.org/file19925/unnamed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue10562 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue10562] Change 'j' for imaginary unit into an 'i'
Changes by Michael Foord mich...@voidspace.org.uk: -- nosy: -michael.foord ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue10562 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue10576] Add a progress callback to gcmodule
Jim Jewett jimjjew...@users.sourceforge.net added the comment: blockquoteDoes anyone think that it is simpler to register two different callbacks than one? /blockquote Moderately, yes. Functions that actually help with cleanup should normally be run only in one phase; it is just stats-gathering and logging functions that might run both times, and I don't mind registering those twice. For functions that are run only once (which I personally think is the more normal case), the choices are between @register_gc def my_callback(actually_run_flag, mydict): if not actually_run_flag: return ... vs @register_gc_before def my_callback(mydict): ... -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue10576 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue2001] Pydoc interactive browsing enhancement
Nick Coghlan ncogh...@gmail.com added the comment: r86975 should fix the problem with Windows paths. I also found an issue where many of the emitted HTML pages contained two HTML header sections. The tests were just written in a way that they only looked at the second of these header sections, while my browser only looked at the first. The same commit adjusts the tests to look at the first emitted header section and changes the flow in the URL handler to only ever invoke html.page() once per request. -- status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue2001 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue2001] Pydoc interactive browsing enhancement
Nick Coghlan ncogh...@gmail.com added the comment: Oh, that would be Éric's point 4 that I fixed. OK, no need to create a new issue for that one then :) -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue2001 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue10562] Change 'j' for imaginary unit into an 'i'
Adam Byrtek adambyr...@gmail.com added the comment: What happened with there should be one-- and preferably only one --obvious way to do it? -- nosy: +adambyrtek ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue10562 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue2690] Precompute range length and enhance range subscript support
Daniel Stutzbach stutzb...@google.com added the comment: (I also noticed that the new methods from issue #9213 are not mentioned in the range() docs Wasn't that fixed in Issue9746? -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue2690 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue10499] Modular interpolation in configparser
Łukasz Langa luk...@langa.pl added the comment: Committed in rev 86976. -- resolution: - accepted stage: patch review - committed/rejected status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue10499 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue2690] Precompute range length and enhance range subscript support
Nick Coghlan ncogh...@gmail.com added the comment: On Sat, Dec 4, 2010 at 2:26 AM, Daniel Stutzbach rep...@bugs.python.org wrote: Daniel Stutzbach stutzb...@google.com added the comment: (I also noticed that the new methods from issue #9213 are not mentioned in the range() docs Wasn't that fixed in Issue9746? Ah, I see what you mean. I was more referring to the lack of a versionchanged note on the range() documentation itself, rather than the mentioning of range() under the sequence types documentation. Some of my new additions to the range documentation could probably be deleted and replaced with a reference to that part of the docs. Cheers, Nick. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue2690 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue10557] Malformed error message from float()
Alexander Belopolsky belopol...@users.sourceforge.net added the comment: On Fri, Dec 3, 2010 at 4:45 AM, Marc-Andre Lemburg rep...@bugs.python.org wrote: .. On Thu, Dec 2, 2010 at 4:34 PM, Marc-Andre Lemburg rep...@bugs.python.org wrote: .. * Please change the API _PyUnicode_NormalizeDecimal() to PyUnicode_ConvertToASCIIDecimal() - that's closer to what it does. Are you sure it is a good idea to give it a public name? I have no problem with calling it _PyUnicode_ConvertToASCIIDecimal(). (Transform may be a better term, though.) Yes, I think it's useful to have as public API. I am afraid this means it has to go in today.I'll take the white space processing out of the public method and try to get the patch ready for commit. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue10557 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue2690] Precompute range length and enhance range subscript support
Nick Coghlan ncogh...@gmail.com added the comment: Daniel Stutzbach pointed out that range() is also mentioned under: http://docs.python.org/dev/library/stdtypes.html#sequence-types-str-bytes-bytearray-list-tuple-range The descriptions of range's limitations there is no longer accurate (slicing is supported following this patch and containment testing is now efficient) -- assignee: georg.brandl - status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue2690 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue10367] python setup.py sdist upload --show-response can fail with UnboundLocalError: local variable 'result' referenced before assignment
Phillip J. Eby p...@telecommunity.com added the comment: Given that this is a pure bugfix to revert a problem in 2.7 -- where no *new* development is being done -- a test isn't actually needed for this patch. There is no point in holding up a distutils1 fix for distutils2's benefit. Daniel: thanks for the patch, it looks good to me. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue10367 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue10616] Change PyObject_AsCharBuffer() error message
New submission from STINNER Victor victor.stin...@haypocalc.com: b'abc'.partition(':') raises a confusing TypeError('expected an object with the buffer interface'): what is a buffer? what is the buffer interface? The error comes from PyObject_AsCharBuffer() which is used by: - bytes methods: partition, rpartition, find, index, rfind, rindex, count, translate, replace, startswith, endswith - complex(): raise a better but incomplete error message on error (complex() arg is not a string), incomplete because number is not mentionned - float(): raise a better error message on error (float() argument must be a string or a number) - PyArg_Parse*() with the e format - posix.spawnvpe(), imp.load_compiled(), imp.load_source(), imp.load_package() The error message should be changed to something mentioning classic Python terms. Eg. TypeError(expected bytes, bytearray or buffer compatible object). -- components: Interpreter Core messages: 123263 nosy: haypo priority: normal severity: normal status: open title: Change PyObject_AsCharBuffer() error message versions: Python 3.1, Python 3.2 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue10616 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue6780] startswith error message is incomplete
STINNER Victor victor.stin...@haypocalc.com added the comment: See also #10616. -- nosy: +haypo ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue6780 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue10616] Change PyObject_AsCharBuffer() error message
STINNER Victor victor.stin...@haypocalc.com added the comment: See also #6780. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue10616 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue10616] Change PyObject_AsCharBuffer() error message
STINNER Victor victor.stin...@haypocalc.com added the comment: complex(): raise a better but incomplete error message on error (complex() arg is not a string), incomplete because number is not mentionned Fixed by r86977. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue10616 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue2690] Precompute range length and enhance range subscript support
Daniel Stutzbach stutzb...@google.com added the comment: The descriptions of range's limitations there is no longer accurate (slicing is supported following this patch and containment testing is now efficient) Want to open a new issue for that? (or is there one already?) -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue2690 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue2690] Precompute range length and enhance range subscript support
Nick Coghlan ncogh...@gmail.com added the comment: (Oops, didn't mean to reclose this yet) I want to wait for Georg's verdict on including the functionality in 3.2 before stressing too much about correct documentation of it :) -- assignee: - georg.brandl status: closed - open ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue2690 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue10562] Change 'j' for imaginary unit into an 'i'
Boštjan Mejak bostjan.me...@gmail.com added the comment: Indeed. There should be spaces around all the operators. Even in my posted example. -- Added file: http://bugs.python.org/file19927/unnamed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue10562 ___Indeed. There should be spaces around all the operators. Even in my posted example. ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue10587] Document the meaning of str methods
Alexander Belopolsky belopol...@users.sourceforge.net added the comment: As discussed in issue10610, it is important to keep the gory details in one place and refer to it throughout the manual. I think the Unicode terminology is best exposed in the unicodedata module documentation. For string character-type methods, I suggest presenting an equivalent to unicodedata expression where possible. For example, x.isalpha() is equivalent to all(unicodedata.category(c) in 'Lu Ll Lt Lm Lo' for c in x) or many be just a character c is alphabetical if unicodedata.category(c) in 'Lu Ll Lt Lm Lo' is true. Other examples: isdigit() - unicodedata.digit(c, None) is not None isdecimal() - unicodedata.decimal(c, None) is not None isnumeric() - unicodedata.numeric(c, None) is not None isprintable()- unicodedata.category(c) not in 'Cc Cf Cs Co Cn Zl Zp Zs' islower() - unicodedata.category(c) == 'Ll' isupper() - unicodedata.category(c) == 'Lu' istitle() - unicodedata.category(c) == 'Lt' isalnum() - isalpha() or isdecimal() or isdigit() or isnumeric() I am not sure about equivalent to expressions for isidentifier() and isspace(). -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue10587 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue10367] python setup.py sdist upload --show-response can fail with UnboundLocalError: local variable 'result' referenced before assignment
Phillip J. Eby p...@telecommunity.com added the comment: Committed Daniel's patch to r86978 in the 2.7 maintenance branch. (The 2.x trunk still has this bug, but is permanently closed to new checkins.) -- stage: needs patch - committed/rejected versions: -3rd party, Python 3.1, Python 3.2 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue10367 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue10562] Change 'j' for imaginary unit into an 'i'
Alexander Belopolsky belopol...@users.sourceforge.net added the comment: On Fri, Dec 3, 2010 at 11:57 AM, Boštjan Mejak rep...@bugs.python.org wrote: .. Indeed. There should be spaces around all the operators. Even in my posted example. Aim higher: we obviously want Python output look beautiful in print, so operands should be surrounded by U+2009 (THIN SPACE). -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue10562 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue2690] Precompute range length and enhance range subscript support
Georg Brandl ge...@python.org added the comment: I'm fine with it: as with the other changes for .count and .index, consistency with the protocols/ABCs the types are members of is not exclusively a new feature. -- status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue2690 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue10562] Change 'j' for imaginary unit into an 'i'
Boštjan Mejak bostjan.me...@gmail.com added the comment: Alexander, is it possible to make an output like (1+2j) be printed as (1 + 2j). Also, why is the result put in parens? -- Added file: http://bugs.python.org/file19928/unnamed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue10562 ___Alexander, is it possible to make an output like (1+2j) be printed as (1 + 2j). Also, why is the result put in parens? ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue10557] Malformed error message from float()
Alexander Belopolsky belopol...@users.sourceforge.net added the comment: On Thu, Dec 2, 2010 at 9:53 PM, Alexander Belopolsky rep...@bugs.python.org wrote: .. .. The honest reason for the exclusion is that I gave up chasing a bug that only shows in full regrtest runs. I have realized where the problem was. PyUnicode_FromUnicode() helpfully interns single-character Unicode objects in the Latin-1 range. So when TransformDecimal replaces whitespace with ' ', it may garble cached strings. I think this optimization is a left-over from the time when unicode did not have interning, but it is never a good idea to change immutable objects in-place after creation, so I'll fix this problem in my code. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue10557 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue10562] Change 'j' for imaginary unit into an 'i'
Alexander Belopolsky belopol...@users.sourceforge.net added the comment: Alexander, is it possible to make an output like (1+2j) be printed as (1 + 2j). Sure, and 'j' can be highlighted in red, but this is a job for a front-end or a custom display hook, not core python. You may want to take a look at ipython. Also, why is the result put in parens? There was a historical reason for that, but I don't remember it now. You may find the answer in the tracker, svn log, or python-dev archives. It may not have been obvious, but most of the comments here including mine were not serious even when they did not include smileys. Nothing will happen here. Time to move on. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue10562 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue10562] Change 'j' for imaginary unit into an 'i'
Changes by Alexander Belopolsky belopol...@users.sourceforge.net: Removed file: http://bugs.python.org/file19927/unnamed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue10562 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue10562] Change 'j' for imaginary unit into an 'i'
Changes by Alexander Belopolsky belopol...@users.sourceforge.net: Removed file: http://bugs.python.org/file19928/unnamed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue10562 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue10562] Change 'j' for imaginary unit into an 'i'
Changes by Alexander Belopolsky belopol...@users.sourceforge.net: -- nosy: -belopolsky ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue10562 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue2690] Precompute range length and enhance range subscript support
Daniel Stutzbach stutzb...@google.com added the comment: The descriptions of range's limitations in the docs still needs an update. -- assignee: georg.brandl - ncoghlan status: closed - open ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue2690 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue10562] Change 'j' for imaginary unit into an 'i'
James Eric Pruitt eric.pru...@gmail.com added the comment: Also, why is the result put in parens? Without them, something like 'eval(100 * + repr(imaginary))' would not work properly. -- nosy: +ericpruitt ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue10562 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue10562] Change 'j' for imaginary unit into an 'i'
Changes by Adam Byrtek adambyr...@gmail.com: -- nosy: -adambyrtek ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue10562 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue10562] Change 'j' for imaginary unit into an 'i'
Changes by Eric Pruitt eric.pru...@gmail.com: -- nosy: -ericpruitt ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue10562 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue10562] Change 'j' for imaginary unit into an 'i'
Changes by Mark Dickinson dicki...@gmail.com: -- assignee: mark.dickinson - nosy: -mark.dickinson ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue10562 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue10534] difflib.SequenceMatcher: expose junk sets, deprecate undocumented isb... functions.
Terry J. Reedy tjre...@udel.edu added the comment: Added version-added and committed. r86983 -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue10534 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue10534] difflib.SequenceMatcher: expose junk sets, deprecate undocumented isb... functions.
Changes by Terry J. Reedy tjre...@udel.edu: -- stage: commit review - needs patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue10534 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue10562] Change 'j' for imaginary unit into an 'i'
Changes by Antoine Pitrou pit...@free.fr: -- nosy: -pitrou ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue10562 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue10562] Change 'j' for imaginary unit into an 'i'
Boštjan Mejak bostjan.me...@gmail.com added the comment: Parens are okay then. Still, put spaces around operators. If 1 + 2j let the output be (1 + 2j)Please!!! -- Added file: http://bugs.python.org/file19929/unnamed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue10562 ___Parens are okay then. Still, put spaces around operators. If  1 + 2j  let the output be (1 + 2j)   Please!!! ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue10497] Incorrect use of gettext in argparse
Éric Araujo mer...@netwok.org added the comment: Fixed in r86984 (py3k) and r86990 (2.7). -- resolution: - fixed stage: patch review - committed/rejected status: pending - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue10497 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue10542] Py_UNICODE_NEXT and other macros for surrogates
Alexander Belopolsky belopol...@users.sourceforge.net added the comment: On Sat, Nov 27, 2010 at 6:38 PM, Raymond Hettinger rep...@bugs.python.org wrote: .. I suggest Py_UNICODE_ADVANCE() to avoid false suggestion that the iterator protocol is being used. As a data point, ICU defines U16_NEXT() for similar purpose. I also like ICU terminology for surrogates (lead and trail) better than the backward high and low. The U16_APPEND() suggests Py_UNICODE_APPEND instead of PUT_NEXT (this one has a virtue of not having next in the name as well.) I still like NEXT better than ADVANCE because it is shorter and has an obvious PREV counterpart that we may want to add later. Note that ICU uses U16_ prefix for these macros even when they operate on 32-bit characters. More at http://icu-project.org/apiref/icu4c/utf16_8h.html http://userguide.icu-project.org/strings -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue10542 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue10478] Ctrl-C locks up the interpreter
Antoine Pitrou pit...@free.fr added the comment: Fixed in r86981 (3.2), r86987 (3.1) and r86992 (2.7). Thanks! -- resolution: - fixed stage: patch review - committed/rejected status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue10478 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue10528] argparse uses %s in gettext calls
Éric Araujo mer...@netwok.org added the comment: Committed in r86993. -- resolution: - fixed stage: commit review - committed/rejected status: pending - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue10528 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue4391] optparse: use proper gettext plurals forms
Éric Araujo mer...@netwok.org added the comment: I just checked argparse and there are similar non-optimal calls. Not all languages can use “string(s)” to express with 0, 1 or more, that’s why we have ngettext. Georg: This is a string change similar to #10528. Does it need a patch and review before the beta1 too? -- nosy: +bethard, georg.brandl priority: low - ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue4391 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue10272] SSL timeouts should raise socket.timeout, not a generic SSLError
Antoine Pitrou pit...@free.fr added the comment: Requalifying this issue so that the ssl module is fixed to raise socket.timeout on socket timeouts, which is not only more logical but much more useful (since you can then specifically handle this error). -- priority: low - normal title: SSL handshake timeouts not caught by transient_internet - SSL timeouts should raise socket.timeout, not a generic SSLError versions: -Python 2.7, Python 3.1 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue10272 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com