Re: Python Worst Practices

2015-02-28 Thread Chris Angelico
On Sat, Feb 28, 2015 at 6:50 PM, Dan Sommers d...@tombstonezero.net wrote: Now if only emacs were clever enough *not* to colorize id when it's one of my names and not the builtin... ;-) I think (part of) the point of the colorization is to make it obvious that you've shadowed a builtin. If you

[issue23546] windows, IDLE and pep 397

2015-02-28 Thread SilentGhost
Changes by SilentGhost ghost@gmail.com: -- components: +Installation versions: -Python 2.7, Python 3.2, Python 3.6 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue23546 ___

[issue23458] [2.7] random: make the file descriptor non-inheritable (on POSIX)

2015-02-28 Thread Serhiy Storchaka
Changes by Serhiy Storchaka storch...@gmail.com: -- assignee: - haypo ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue23458 ___ ___

[issue20204] pydocs fails for some C implemented classes

2015-02-28 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: What type of warning is more preferable here? It will be emitted at import. E.g.: $ ./python -Wall Python 3.5.0a1+ (default:28ba862036cc+, Feb 28 2015, 11:01:23) [GCC 4.8.2] on linux Type help, copyright, credits or license for more information. import

[issue23528] Limit decompressed data when reading from GzipFile

2015-02-28 Thread Arfrever Frehtes Taifersar Arahesis
Changes by Arfrever Frehtes Taifersar Arahesis arfrever@gmail.com: -- nosy: +Arfrever ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue23528 ___

[issue23529] Limit decompressed data when reading from LZMAFile and BZ2File

2015-02-28 Thread Arfrever Frehtes Taifersar Arahesis
Changes by Arfrever Frehtes Taifersar Arahesis arfrever@gmail.com: -- nosy: +Arfrever ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue23529 ___

[issue23546] windows, IDLE and pep 397

2015-02-28 Thread Liam Marsh
New submission from Liam Marsh: hello, pep 397 describes a Python launcher for the Windows platform. A Python launcher is a single executable which uses a number of heuristics to locate a Python executable and launch it with a specified command line. Problem: that affects only the

Re: Python Worst Practices

2015-02-28 Thread Chris Angelico
On Sat, Feb 28, 2015 at 7:48 PM, Ian Kelly ian.g.ke...@gmail.com wrote: On Fri, Feb 27, 2015 at 9:42 PM, Dan Sommers d...@tombstonezero.net wrote: I don't think I've ever used the builtin function id in a program. Ever. Not even once. Honestly, what is a valid use case? If you have a dict

Re: Python Worst Practices

2015-02-28 Thread Marko Rauhamaa
Ethan Furman et...@stoneleaf.us: Sure, for the ones I use as built-ins. But I went through the color file for vim and took out the built-ins I use regularly as variables -- and 'id' was the first one to go. Ah, yes. The id is with us from the beginning. The self seeks to gratify the whims of

[issue23304] Unused Superclass in calendar.py

2015-02-28 Thread Serhiy Storchaka
Changes by Serhiy Storchaka storch...@gmail.com: -- resolution: - not a bug status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue23304 ___

Re: Python Worst Practices

2015-02-28 Thread Ian Kelly
On Fri, Feb 27, 2015 at 9:42 PM, Dan Sommers d...@tombstonezero.net wrote: I don't think I've ever used the builtin function id in a program. Ever. Not even once. Honestly, what is a valid use case? If you have a dict that you want to key on object identity rather than equality, then you can

[issue21619] Cleaning up a subprocess with a broken pipe

2015-02-28 Thread Roundup Robot
Roundup Robot added the comment: New changeset b5e9ddbdd4a7 by Serhiy Storchaka in branch '3.4': Issue #21619: Popen objects no longer leave a zombie after exit in the with https://hg.python.org/cpython/rev/b5e9ddbdd4a7 New changeset cdac249808a8 by Serhiy Storchaka in branch 'default': Issue

[issue21619] Cleaning up a subprocess with a broken pipe

2015-02-28 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Thank you for your contribution Martin. -- resolution: - fixed stage: patch review - resolved type: - resource usage versions: +Python 3.5 ___ Python tracker rep...@bugs.python.org

Re: Python Worst Practices

2015-02-28 Thread BartC
On 28/02/2015 01:09, Steven D'Aprano wrote: Likewise: int = 23 n = int(42) Isn't it obvious that the second use of int has to be the built-in function? I wish that the computer would understand from context which one I mean. (People here would like PL/I then which apparently has *no*

[issue21619] Cleaning up a subprocess with a broken pipe

2015-02-28 Thread STINNER Victor
STINNER Victor added the comment: Why not ignoring BrokenPipeError like communicate()? -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue21619 ___

[issue21619] Cleaning up a subprocess with a broken pipe

2015-02-28 Thread Serhiy Storchaka
Changes by Serhiy Storchaka storch...@gmail.com: -- status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue21619 ___ ___

[issue23088] Document that PyUnicode_AsUTF8() returns a null-terminated string

2015-02-28 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: May be mention that the result of PyUnicode_AsUTF8() can contain null bytes? And the same for PyBytes_AS_STRING()/PyBytes_AsString()? -- nosy: +serhiy.storchaka ___ Python tracker rep...@bugs.python.org

[issue22341] Python 3 crc32 documentation clarifications

2015-02-28 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: crc 0x is still used in gzip, zipfile and tarfile. And some comments say about signess of 32-bit checksums. -- nosy: +serhiy.storchaka ___ Python tracker rep...@bugs.python.org

[issue23411] Update urllib.parse.__all__

2015-02-28 Thread Serhiy Storchaka
Changes by Serhiy Storchaka storch...@gmail.com: -- versions: +Python 3.4, Python 3.5 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue23411 ___ ___

[issue17140] Document multiprocessing.pool.ThreadPool

2015-02-28 Thread Davin Potts
Changes by Davin Potts pyt...@discontinuity.net: -- nosy: +davin ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue17140 ___ ___ Python-bugs-list

[issue23496] Steps for Android Native Build of Python 3.4.2

2015-02-28 Thread Stefan Krah
Stefan Krah added the comment: Fine, I'm also optimizing and the fix isn't going into libmpdec. Android can use the Python version of decimal. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue23496

[issue23446] Use PyMem_New instead of PyMem_Malloc

2015-02-28 Thread Arfrever Frehtes Taifersar Arahesis
Changes by Arfrever Frehtes Taifersar Arahesis arfrever@gmail.com: -- nosy: +Arfrever versions: +Python 2.7, Python 3.4 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue23446 ___

[issue23490] allocation (and overwrite) of a 0 byte buffer

2015-02-28 Thread Arfrever Frehtes Taifersar Arahesis
Changes by Arfrever Frehtes Taifersar Arahesis arfrever@gmail.com: -- nosy: +Arfrever ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue23490 ___

Re: Python Worst Practices

2015-02-28 Thread Cousin Stanley
From : Tim Chase A quick google-and-tally for languages and their corresponding number of keywords: re-sorted 21 : Lua 31 : Python2.x 33 : Python3.x 33 : C 37 : Pike 40 : Perl 40 : Ruby 50 : Java 54 : Pascal

[issue23247] Multibyte codec StreamWriter.reset() crashes

2015-02-28 Thread Serhiy Storchaka
Changes by Serhiy Storchaka storch...@gmail.com: -- assignee: - serhiy.storchaka nosy: +serhiy.storchaka priority: normal - high ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue23247 ___

[issue23521] OverflowError from timedelta * float in datetime.py

2015-02-28 Thread Roundup Robot
Roundup Robot added the comment: New changeset 8fe15bf68522 by Alexander Belopolsky in branch '3.4': Fixes #23521: Corrected pure python implementation of timedelta division. https://hg.python.org/cpython/rev/8fe15bf68522 New changeset d783132d72bc by Alexander Belopolsky in branch 'default':

[issue17576] PyNumber_Index() is not int-subclass friendly (or operator.index() docos lie)

2015-02-28 Thread Nick Coghlan
Nick Coghlan added the comment: OK, something appears to have gotten confused along the way here. Barry's original problem report was that operator.index() was returning a different answer than operator.__index__() for int subclasses. Absolutely nothing to do with the int builtin at all.

Re: Python Worst Practices

2015-02-28 Thread Chris Angelico
On Sat, Feb 28, 2015 at 9:39 PM, BartC b...@freeuk.com wrote: (People here would like PL/I then which apparently has *no* reserved words, so you can write: if if=then then ...) Likewise REXX has no reserved words; also, SQL went part-way there, with the notion of non-reserved keywords. For

[issue13966] Add disable_interspersed_args() to argparse.ArgumentParser

2015-02-28 Thread László Attila Tóth
László Attila Tóth added the comment: It seems I found the solution in the attached file argparse.disable_interspersed_args.python35.diff, and it's much-much easier than I thought. I assume that this patch can cleanly applied to earlier versions (python 3.2-3.4), but I didn't check it.

[issue23521] OverflowError from timedelta * float in datetime.py

2015-02-28 Thread Alexander Belopolsky
Changes by Alexander Belopolsky alexander.belopol...@gmail.com: -- resolution: - fixed stage: commit review - resolved status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue23521

[issue23521] OverflowError from timedelta * float in datetime.py

2015-02-28 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: LGTM. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue23521 ___ ___ Python-bugs-list mailing list

[issue20204] pydocs fails for some C implemented classes

2015-02-28 Thread Nick Coghlan
Nick Coghlan added the comment: The case for RuntimeWarning: the object isn't necessarily *broken* as such (most things will still work), but pickling and some introspection features may not work properly. The case for DeprecationWarning: breaking picking and introspection is bad when the

[issue23411] Update urllib.parse.__all__

2015-02-28 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Exposed classes are the types of results returned by urllib.parse functions. It is very unlikely that they will be directly used by the user. I see the only benefit of adding these class to __all__ that they will become visible for pydoc. Is it worth to

[issue23545] Turn on extra warnings on GCC

2015-02-28 Thread Stefan Krah
Stefan Krah added the comment: +1. I think the flags should go into CFLAGS_NODIST. -- nosy: +skrah ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue23545 ___

[issue23496] Steps for Android Native Build of Python 3.4.2

2015-02-28 Thread Cyd Haselton
Cyd Haselton added the comment: Well, why don't you try? :) Resource optimization. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue23496 ___ ___

[issue20305] Android's incomplete locale.h implementation prevents cross-compilation

2015-02-28 Thread Stefan Krah
Stefan Krah added the comment: Consider the libmpdec part rejected. It is too much work given that external libmpdecs need to be compatible and Android can use the Python version of decimal. -- nosy: +skrah ___ Python tracker rep...@bugs.python.org

[issue23547] Engineering at Google in 2015

2015-02-28 Thread Michael Bevilacqua-Linn
New submission from Michael Bevilacqua-Linn: Hey thanks so much for reaching out! I'm not really interested in leaving Philly or my current job at the moment though... Thanks! MBL On Fri, Feb 27, 2015 at 4:48 AM, Margaret O'Reilly margare...@google.com wrote: Hi Michael, I hope you are

[issue23547] Engineering at Google in 2015

2015-02-28 Thread Benjamin Peterson
Changes by Benjamin Peterson benja...@python.org: -- resolution: - not a bug status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue23547 ___

Re: Python Worst Practices

2015-02-28 Thread Marko Rauhamaa
BartC b...@freeuk.com: (Over here it's spelled colour...) The language of science and technology is American English. Learn it like everybody else has to. Marko -- https://mail.python.org/mailman/listinfo/python-list

[issue23062] test_argparse --version test cases

2015-02-28 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Why the test class is moved? -- nosy: +serhiy.storchaka ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue23062 ___

Re: requesting you all to please guide me , which tutorials is best to learn redis database

2015-02-28 Thread Denis McMahon
On Thu, 26 Feb 2015 11:14:50 -0800, Jai wrote: i want to learn redis database and its use via python , please guide me which tutorials i should be study, so that i can learn it in good way Using databases via python often involves working with dictionaries or lists, lists of

[issue22350] nntplib file write failure causes exception from QUIT command

2015-02-28 Thread Serhiy Storchaka
Changes by Serhiy Storchaka storch...@gmail.com: -- assignee: - serhiy.storchaka nosy: +serhiy.storchaka ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue22350 ___

[issue23496] Steps for Android Native Build of Python 3.4.2

2015-02-28 Thread Cyd Haselton
Cyd Haselton added the comment: Fine, I'm also optimizing and the fix isn't going into libmpdec. Android can use the Python version of decimal. Er, ok. Not entirely sure what this means, mostly because the handful of spare cycles not allocated to a) getting a fork up, running and patched b)

Re: Python Worst Practices

2015-02-28 Thread Mark Lawrence
On 27/02/2015 21:40, Chris Angelico wrote: On Sat, Feb 28, 2015 at 8:37 AM, Dave Angel da...@davea.name wrote: Right. In C and C++, instead of being the first slide, it'd be the first 3 or 4. Between header file conflicts (especially good because the stdlib itself has many multiply-defined

[issue23231] Fix codecs.iterencode/decode() by allowing data parameter to be omitted

2015-02-28 Thread Serhiy Storchaka
Changes by Serhiy Storchaka storch...@gmail.com: -- assignee: - serhiy.storchaka nosy: +serhiy.storchaka ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue23231 ___

[issue23496] Steps for Android Native Build of Python 3.4.2

2015-02-28 Thread Stefan Krah
Stefan Krah added the comment: I wouldn't know if they're reported to the same bug tracker...it's possible they aren't. Well, why don't you try? :) Additionally it's possible that the lack of locale support in libc isn't considered a bug. Their struct lconv violates both the C standard

Re: Python Worst Practices

2015-02-28 Thread Chris Angelico
On Sun, Mar 1, 2015 at 2:33 AM, Mark Lawrence breamore...@yahoo.co.uk wrote: It also makes me wonder what idiot decided to use C as the language for the first Python implementation? Or was it written in something else and then ported? Guido, probably. And what other language would you

[issue23550] Add to unicodedata a function to query the Quick_Check property for a character

2015-02-28 Thread Marc-Andre Lemburg
Marc-Andre Lemburg added the comment: Can you provide a patch for this ? -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue23550 ___ ___

[issue23549] heapq docs should be more precise about how to access the smallest element

2015-02-28 Thread Martin Panter
Martin Panter added the comment: “Smalest” is spelt with a double L. -- nosy: +vadmium ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue23549 ___ ___

[issue23411] Update urllib.parse.__all__

2015-02-28 Thread Martin Panter
Martin Panter added the comment: For what it’s worth, I have used the the SplitResult class directly to build URLs from components, and to get at the hostname:port parsing functionality, as described in Issue 23416. As well as pydoc, I notice when things are missing from __all__ when I try to

[issue20204] pydocs fails for some C implemented classes

2015-02-28 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: It also can be ImportWarning (warnings triggered during the process of importing a module (ignored by default)). -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue20204

[issue23547] Engineering at Google in 2015

2015-02-28 Thread Ned Deily
Changes by Ned Deily n...@acm.org: -- Removed message: http://bugs.python.org/msg236889 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue23547 ___

[issue19980] Improve help('non-topic') response

2015-02-28 Thread Roundup Robot
Roundup Robot added the comment: New changeset 4a1fe339dcf6 by Serhiy Storchaka in branch 'default': Issue #19980: Improved help() for non-recognized strings. help('') now https://hg.python.org/cpython/rev/4a1fe339dcf6 -- nosy: +python-dev ___

[issue23547] Misdirected

2015-02-28 Thread Ned Deily
Changes by Ned Deily n...@acm.org: -- stage: - resolved title: Engineering at Google in 2015 - Misdirected ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue23547 ___

[issue21619] Cleaning up a subprocess with a broken pipe

2015-02-28 Thread Serhiy Storchaka
Changes by Serhiy Storchaka storch...@gmail.com: -- assignee: - serhiy.storchaka nosy: +serhiy.storchaka stage: - patch review ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue21619 ___

Re: Python Worst Practices

2015-02-28 Thread BartC
On 25/02/2015 20:58, Michiel Overtoom wrote: On Feb 25, 2015, at 21:45, Mark Lawrence wrote: http://www.slideshare.net/pydanny/python-worst-practices I like the way it advises against preserving pixels by removing vowels from identifiers. Then it gives the best practice example of using

[issue21619] Cleaning up a subprocess with a broken pipe

2015-02-28 Thread Roundup Robot
Roundup Robot added the comment: New changeset 1b4d916329e7 by Serhiy Storchaka in branch '3.4': Fixed a test for issue #21619 on Windows. https://hg.python.org/cpython/rev/1b4d916329e7 New changeset eae459e35cb9 by Serhiy Storchaka in branch 'default': Fixed a test for issue #21619 on Windows.

[issue23200] Clarify max_length and flush() for zlib decompression

2015-02-28 Thread Serhiy Storchaka
Changes by Serhiy Storchaka storch...@gmail.com: -- nosy: +nadeem.vawda stage: - patch review ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue23200 ___

[issue23391] Documentation of EnvironmentError (OSError) arguments disappeared

2015-02-28 Thread Serhiy Storchaka
Changes by Serhiy Storchaka storch...@gmail.com: -- keywords: +needs review nosy: +pitrou stage: - patch review versions: +Python 3.5 -Python 3.3 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue23391

[issue23521] OverflowError from timedelta * float in datetime.py

2015-02-28 Thread Alexander Belopolsky
Changes by Alexander Belopolsky alexander.belopol...@gmail.com: -- stage: needs patch - commit review versions: +Python 3.4 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue23521 ___

Re: Python Worst Practices

2015-02-28 Thread Mark Lawrence
On 28/02/2015 10:56, Marko Rauhamaa wrote: BartC b...@freeuk.com: (Over here it's spelled colour...) The language of science and technology is American English. Learn it like everybody else has to. Marko People from Angleland use any English apart from our own, never. Next thing

[issue18986] Add a case-insensitive case-preserving dict

2015-02-28 Thread Jason R. Coombs
Jason R. Coombs added the comment: I'm also eager to hear what limitations prevented the acceptance. Please do link back here when you've posted. I have to say, I'm not entirely surprised. In my implementation, I struggled with some cases, and it certainly doesn't feel like a fully safe

PIL installation fails; registration problem

2015-02-28 Thread GerritM
I am reinstalling everything on my new Windows 7 laptop. I run into a problem when installing PIL 1.1.7, in combination with my Activestate Python 2.7.8. The PIL installer complains that no Python is registered. I did run Joakim Löw's script to register Python. This results in the message ***

[issue23496] Steps for Android Native Build of Python 3.4.2

2015-02-28 Thread Ryan Gonzalez
Ryan Gonzalez added the comment: Ok...so the joys of autoconf configuring bite again. ALL Android devices have /dev/ptmx (adb even assumes it)...should the configure script be modified to skip that check if cross-compiling for Android? -- ___

[issue20128] Re-enable test_modules_search_builtin() in test_pydoc

2015-02-28 Thread Mark Lawrence
Mark Lawrence added the comment: Whilst testing #19980 I noticed that three tests are still skipped. -- nosy: +BreamoreBoy ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue20128 ___

[issue23548] TypeError in event loop finalizer, new in Python 3.4.3

2015-02-28 Thread Guido van Rossum
Guido van Rossum added the comment: So this is still strange. When you do this, does it give the same exception? import signal signal.signal(signal.SIGCHLD, signal.SIG_DFL) -- ___ Python tracker rep...@bugs.python.org

suggestions for functional style (singleton pattern?)

2015-02-28 Thread yves
Hi, For some scripts, I write in a a more functional way, using a lot of small functions outside of any class. Although it makes the code clearer for specific cases, I have found that it makes debugging and using the repl in general difficult, as as I have to re-initialise every single objects

[issue20128] Re-enable test_modules_search_builtin() in test_pydoc

2015-02-28 Thread Serhiy Storchaka
Changes by Serhiy Storchaka storch...@gmail.com: -- nosy: +serhiy.storchaka ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue20128 ___ ___

[issue23496] Steps for Android Native Build of Python 3.4.2

2015-02-28 Thread Cyd Haselton
Cyd Haselton added the comment: *ALL Android devices have /dev/ptmx (adb even assumes it)...should the *configure script be modified to skip that check if cross-compiling for *Android? Yes, definitely. See the mods to pyconfig.h here

[issue18382] multiprocessing's overlapped PipeConnection issues on Windows 8

2015-02-28 Thread Steve Dower
Changes by Steve Dower steve.do...@microsoft.com: -- assignee: - steve.dower components: +Library (Lib), Windows -Extension Modules nosy: +tim.golden, zach.ware stage: needs patch - patch review ___ Python tracker rep...@bugs.python.org

[issue23549] heapq docs should be more precise about how to access the smallest element

2015-02-28 Thread Eli Bendersky
Eli Bendersky added the comment: Proposed patch (generated vs. the 3.4 docs) is attached -- keywords: +patch Added file: http://bugs.python.org/file38277/issue23549.1.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue23549

[issue23430] socketserver.BaseServer.handle_error() should not catch exiting exceptions

2015-02-28 Thread Serhiy Storchaka
Changes by Serhiy Storchaka storch...@gmail.com: -- nosy: +pitrou ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue23430 ___ ___ Python-bugs-list

[issue19980] Improve help('non-topic') response

2015-02-28 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: There is a problem with the patch. When you are in interactive help utility, then the request 'help' runs nested interactive help utility. The difference between unpatched behavior is that now you need press Ctrl-D or 'q' twice to exit to normal Python

[issue23539] Content-length not set for HTTP methods expecting body when body is None

2015-02-28 Thread Martin Panter
Martin Panter added the comment: Yes I agree with the behaviour that None means no body (for requests such as GET), and an empty string means an empty but present body. Correct me if I’m wrong, but I think the fix for Issue 14721 already does that. Perhaps the new behaviour needs a “Changed

[issue23550] Add to unicodedata a function to query the Quick_Check property for a character

2015-02-28 Thread Hammerite
Hammerite added the comment: No, I haven't done any work on it. Is that the done thing when suggesting something? I'm sorry, I wasn't aware. I could look into it. I am unfamiliar with the CPython codebase, but I can have a go. -- ___ Python

[issue19980] Improve help('non-topic') response

2015-02-28 Thread Mark Lawrence
Mark Lawrence added the comment: LGTM. I noticed this running the tests. test_modules (test.test_pydoc.PydocImportTest) ... skipped 'causes undesireable side-effects (#20128)' test_modules_search (test.test_pydoc.PydocImportTest) ... skipped 'causes undesireable side-effects (#20128)'

[issue23551] IDLE to provide menu options for using PIP

2015-02-28 Thread Terry J. Reedy
Terry J. Reedy added the comment: Raymond, I have had a very vague idea of doing something like this. Thanks for posting something more concrete. I share the sentiments of your last sentence. Reading Stackoverflow, it is apparent that some people with two+ Python versions do not know that a

Re: Python Worst Practices

2015-02-28 Thread Gregory Ewing
Chris Angelico wrote: Likewise REXX has no reserved words; also, SQL went part-way there, with the notion of non-reserved keywords. Python sometimes has those, too. For example, the as in import as was non-reserved when it was first introduced, to avoid abruptly breaking code that used it as a

[issue23549] heapq docs should be more precise about how to access the smallest element

2015-02-28 Thread Eli Bendersky
Eli Bendersky added the comment: Good catch. Attaching a new version of the patch with the typo fixed. -- Added file: http://bugs.python.org/file38280/issue23549.2.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue23549

[issue19980] Improve help('non-topic') response

2015-02-28 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Thank you for your contribution Mark. I noticed this running the tests. This is temporary OK. -- resolution: - fixed stage: patch review - resolved status: open - closed ___ Python tracker

[issue23551] IDLE to provide menu options for using PIP

2015-02-28 Thread Terry J. Reedy
Terry J. Reedy added the comment: Thinking a bit more, the Idle entry point could be one entry, 'Install Packages' or 'Manage Packages' on the Options menu (or maybe Help menu). I am not sure that the new window would need a submenu, as I think everything listed in the opening post could fit

[issue23539] Content-length not set for HTTP methods expecting body when body is None

2015-02-28 Thread James Rutherford
James Rutherford added the comment: I actually consider this a fix for the fix in 14721, rather than a new feature. The only new behaviour here is setting content length to be zero if body is None on PATCH, POST, or PUT. Happy to change the labeling if that's the consensus but IMO it's a

[issue23551] IDLE to provide menu options for using PIP

2015-02-28 Thread Donald Stufft
Donald Stufft added the comment: I'm unlikely to have the time or motivation to do this anytime soon (just to be clear). I would be able to advise anyone who does feel like doing it the best ways to interact with pip itself though. -- ___ Python

[issue23553] Reduce the number of comparison for range checking.

2015-02-28 Thread Raymond Hettinger
New submission from Raymond Hettinger: Python's core is full of bound checks like this one in Objects/listobject.c: static PyObject * list_item(PyListObject *a, Py_ssize_t i) { if (i 0 || i = Py_SIZE(a)) { ... Abner Fog's high-level language optimization guide,

Re: Python Worst Practices

2015-02-28 Thread Chris Angelico
On Sun, Mar 1, 2015 at 3:28 AM, Mark Lawrence breamore...@yahoo.co.uk wrote: I love fishing, just dangle the bait and wait to see what bites :) Yeah, you usually catch someone. Sometimes they need to be majorly sleep-deprived at half past three in the morning so they're looking at message bodies

[issue23549] heapq docs should be more precise about how to access the smallest element

2015-02-28 Thread Eli Bendersky
New submission from Eli Bendersky: The heapq documentation has this paragraph after the doc of nsmallest: The latter two functions perform best for smaller values of n. For larger values, it is more efficient to use the sorted() function. Also, when n==1, it is more efficient to use the

[issue23062] test_argparse --version test cases

2015-02-28 Thread Berker Peksag
Berker Peksag added the comment: Why the test class is moved? Just wanted to group all TestHelp* tests together. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue23062 ___

[issue23062] test_argparse --version test cases

2015-02-28 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: But it already was between two help tests: TestHelpNoHelpOptional and TestHelpNone. I think that original test tested that the help attribute is optional for the --version argument and default description is printed in help output. This test shouldn't be

Re: Python Worst Practices

2015-02-28 Thread BartC
On 28/02/2015 15:33, Mark Lawrence wrote: It also makes me wonder what idiot decided to use C as the language for the first Python implementation? Or was it written in something else and then ported? Python was already slow enough even written in C. With any other implementation language, it

Re: Python Worst Practices

2015-02-28 Thread Tim Chase
On 2015-02-28 17:56, MRAB wrote: On 2015-02-28 16:03, Cousin Stanley wrote: From : Tim Chase A quick google-and-tally for languages and their corresponding number of keywords: re-sorted 21 : Lua 31 : Python2.x 33 : Python3.x 33 :

[issue23550] Add to unicodedata a function to query the Quick_Check property for a character

2015-02-28 Thread SilentGhost
Changes by SilentGhost ghost@gmail.com: -- nosy: +benjamin.peterson, lemburg, loewis, pitrou versions: +Python 3.5 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue23550 ___

[issue23548] TypeError in event loop finalizer, new in Python 3.4.3

2015-02-28 Thread Jack O'Connor
Jack O'Connor added the comment: `close()` fixes it; thanks for the workaround! When I throw a print statement inside `remove_signal_handler`, it says that sig is 17 and handler is 0. 17 looks to be SIGCHLD, presumably from the little echo subprocess exiting in this example. --

[issue23549] heapq docs should be more precise about how to access the smallest element

2015-02-28 Thread Raymond Hettinger
Changes by Raymond Hettinger raymond.hettin...@gmail.com: -- assignee: docs@python - rhettinger nosy: +rhettinger ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue23549 ___

[issue23548] TypeError in event loop finalizer, new in Python 3.4.3

2015-02-28 Thread Jack O'Connor
New submission from Jack O'Connor: This toy program: import asyncio @asyncio.coroutine def main(): p = yield from asyncio.create_subprocess_shell('echo hi') yield from p.wait() asyncio.get_event_loop().run_until_complete(main()) Produces this output on Arch Linux under Python 3.4.3

[issue23539] Content-length not set for HTTP methods expecting body when body is None

2015-02-28 Thread James Rutherford
James Rutherford added the comment: Happy to remove OPTIONS from the list of methods that gets a content-length where body is None, but do we also want to consider behaviour if it's the empty string? My feeling is that '' implies present but empty (so should have a content-length set to

Re: Python Worst Practices

2015-02-28 Thread Mark Lawrence
On 28/02/2015 15:46, Chris Angelico wrote: On Sun, Mar 1, 2015 at 2:33 AM, Mark Lawrence breamore...@yahoo.co.uk wrote: It also makes me wonder what idiot decided to use C as the language for the first Python implementation? Or was it written in something else and then ported? Guido,

Re: Python Worst Practices

2015-02-28 Thread Mark Lawrence
On 28/02/2015 16:36, Chris Angelico wrote: On Sun, Mar 1, 2015 at 3:28 AM, Mark Lawrence breamore...@yahoo.co.uk wrote: I love fishing, just dangle the bait and wait to see what bites :) Yeah, you usually catch someone. Sometimes they need to be majorly sleep-deprived at half past three in

[issue19980] Improve help('non-topic') response

2015-02-28 Thread Serhiy Storchaka
Changes by Serhiy Storchaka storch...@gmail.com: Added file: http://bugs.python.org/file38279/issue19880v4.diff ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue19980 ___

[issue19980] Improve help('non-topic') response

2015-02-28 Thread Serhiy Storchaka
Changes by Serhiy Storchaka storch...@gmail.com: Removed file: http://bugs.python.org/file38278/issue19880v4.diff ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue19980 ___

[issue23552] Have timeit warn about runs that are not independent of each other

2015-02-28 Thread Raymond Hettinger
New submission from Raymond Hettinger: IPython 3.0 added a useful feature that we ought to consider for inclusion either in timeit.repeat() or in the command-line interface: Using %timeit prints warnings if there is at least a 4x difference in timings between the slowest and fastest runs,

  1   2   >