Re: [Python-Dev] IDLE in the stdlib

2013-03-21 Thread Terry Reedy
On 3/20/2013 12:41 PM, Eli Bendersky wrote: Interesting writeup about PyCon 2013 young coder education:http://therealkatie.net/blog/2013/mar/19/pycon-2013-young-coders/ Quote: "We used IDLE because it's already on Raspian's desktop. Personally, I like IDLE as a teaching tool. It's included in t

Re: [Python-Dev] cpython: Issue #13248: removed deprecated and undocumented difflib.isbjunk, isbpopular.

2013-03-21 Thread Terry Reedy
On 3/21/2013 2:23 PM, R. David Murray wrote: On Thu, 21 Mar 2013 01:19:42 -0400, Terry Reedy wrote: How does this look? Is ``replacement`` right? Should the subsequent sm by itself be marked? If so, how? * :meth:`difflib.SequenceMatcher.isbjunk` and :meth

Re: [Python-Dev] IDLE in the stdlib

2013-03-21 Thread Terry Reedy
On 3/21/2013 5:19 PM, Mark Janssen wrote: On Wed, Mar 20, 2013 at 8:32 PM, Terry Reedy mailto:tjre...@udel.edu>> wrote: I might be jumping in late here, but... Not at all. Thank you for the enlightening post. The *only* thing I find "ugly" about it is that it doesn't

Re: [Python-Dev] IDLE in the stdlib

2013-03-21 Thread Terry Reedy
On 3/21/2013 11:21 AM, Nick Coghlan wrote: On Thu, Mar 21, 2013 at 5:26 AM, Daniel Holth wrote: I showed IDLE to my 6-year-old on the Raspberry Pi and I'm convinced it is cool. Gave up on trying to (slowly) install bpython. We were multiplying large numbers and counting to 325,000 in no time. I

Re: [Python-Dev] IDLE in the stdlib

2013-03-21 Thread Terry Reedy
On 3/21/2013 7:17 PM, Thomas Wouters wrote: although I do think we should move 'idlelib' out of the standard library :) Currently, 'python -m idlelib' start idle from the command line. If idlelib/ were moved out of /Lib, idle.py should be added so 'python -m idle' would work. I may suggest t

Re: [Python-Dev] IDLE in the stdlib

2013-03-25 Thread Terry Reedy
On 3/22/2013 2:51 PM, francis wrote: ~$ python2.7 -m idlelib /usr/bin/python2.7: No module named idlelib.__main__; 'idlelib' is a package and cannot be directly executed Same with python3... C:\Programs>python33\python.exe -m idlelib brings up IDLE on Windows. 2.7 and 3.2 do not work as abov

Re: [Python-Dev] Simple IDLE issues to commit before Python 2.7.4 release in two weeks on 4/6/2013

2013-03-25 Thread Terry Reedy
On 3/25/2013 3:30 PM, Todd Rovito wrote: http://bugs.python.org/issue7136 Idle File Menu Option Improvement http://bugs.python.org/issue17390 display python version on idle title bar http://bugs.python.org/issue17511 Idle find function closes after each find operation http://bugs.python.org/issu

Re: [Python-Dev] Idle, site.py, and the release candidates

2013-03-31 Thread Terry Reedy
On 3/31/2013 2:39 AM, Nick Coghlan wrote: On Sun, Mar 31, 2013 at 12:34 PM, Terry Jan Reedy > I do not know enough about other circumstances in which stdin.fileno would do something other than return 0 to be sure of what the proper fix would be. (I increasin

Re: [Python-Dev] [Python-checkins] cpython: fix compilation on Windows

2013-05-16 Thread Terry Reedy
On 5/16/2013 4:17 PM, victor.stinner wrote: summary: fix compilation on Windows That fixed my problem with compiling 3.4, 32 bit, Win 7. Thanks. But I cannot compile 3.3 python_d since May 6. In fact, there are more errors now than 8 hours ago. 7 things failed to build instead of 5 (3 is no

Re: [Python-Dev] Clean way in python to test for None, empty, scalar, and list/ndarray? A prayer to the gods of Python

2013-06-15 Thread Terry Reedy
On 6/15/2013 8:53 AM, Tres Seaver wrote: In fifteen years of Python programming, I have literally *never* wanted to iterate over 'str' (or now 'bytes'). If so, it is because you have always been able to use pre-written methods and functions that internally do the iteration for you. > I've a

Re: [Python-Dev] Clean way in python to test for None, empty, scalar, and list/ndarray? A prayer to the gods of Python

2013-06-15 Thread Terry Reedy
On 6/15/2013 5:45 PM, Tres Seaver wrote: Given that strings are implemented in C, That is a current implementation detail. String functions were originally written in python in string.py. Some used 'for c in s:'. The functions only because methods after 2.2. I presume Pypy starts from Pytho

Re: [Python-Dev] RFC: PEP 445: Add new APIs to customize Python memory allocators

2013-06-19 Thread Terry Reedy
On 6/19/2013 11:24 AM, Victor Stinner wrote: 2013/6/19 Antoine Pitrou : Le Tue, 18 Jun 2013 22:40:49 +0200, Victor Stinner a écrit : Only one get/set function for block allocators -- Replace the 6 functions: * ``void PyMem_GetRawAllocator(PyMemBl

Re: [Python-Dev] stat module in C -- what to do with stat.py?

2013-06-21 Thread Terry Reedy
On 6/21/2013 7:45 AM, Antoine Pitrou wrote: Le Fri, 21 Jun 2013 21:39:10 +1000, Nick Coghlan a écrit : I think it's OK to expose additional platform specific features in the C version, and have them fail cleanly with the pure Python version (rather than silently giving the wrong answer). PE

Re: [Python-Dev] Reminder: an oft-forgotten rule about docstring formatting (PEP 257)

2013-06-27 Thread Terry Reedy
On 6/27/2013 11:57 AM, Guido van Rossum wrote: Yes on one line, capitalized, period. No on single sentence. Complete and correct docstrings are somewhat rare in idlelib. About half are missing. Single lines typically omit the period. Multiple lines often omit the blank line after the first. I

Re: [Python-Dev] Reminder: an oft-forgotten rule about docstring formatting (PEP 257)

2013-06-27 Thread Terry Reedy
On 6/27/2013 12:57 PM, Guido van Rossum wrote: It was never my intention to enforce that everything has a docstring. Just that if it does, it looks good. Ok, I won't add them when a function's name actually makes what it does obvious. But when I have to spend at least a few minutes reading the

Re: [Python-Dev] Reminder: an oft-forgotten rule about docstring formatting (PEP 257)

2013-06-28 Thread Terry Reedy
On 6/26/2013 9:56 PM, Guido van Rossum wrote: PEP 257 says this on the formatting of multi-line docstrings: """ Multi-line docstrings consist of a summary line just like a one-line docstring, followed by a blank line, followed by a more elaborate description. fileinput has docstrings like

Re: [Python-Dev] winsound.c fix to support python3

2013-06-29 Thread Terry Reedy
On 6/29/2013 11:59 AM, Tamir Friedman wrote: Hello, My name is Tamir Friedman, and I suggest to fix a bug in PlaySound in winsound library. It's doesn't support the SND_MEMORY feature because its accepts only "str" and rejects "bytes" type. therefore i include the fixed source file: Thank you f

Re: [Python-Dev] Oddity in MISC/News on default

2013-07-05 Thread Terry Reedy
On 7/4/2013 3:36 PM, Guido van Rossum wrote: Maybe the mistake is that the others aren't mentioned? Or perhaps everything before 3.4a1 should be dropped? I forget what kind of policy we have for this -- is it all changes in this branch or only changes unique to this branch? It cannot be 'unique

Re: [Python-Dev] Rough idea for adding introspection information for builtins

2013-07-07 Thread Terry Reedy
On 7/7/2013 7:35 AM, Larry Hastings wrote: On 07/07/2013 07:19 AM, Ronald Oussoren wrote: Not entirely on topic, but close enough: pydoc currently doesn't use the __signature__ information at all. Adding such support would be easy enough, see #17053 for an implementation ;-) True, it doesn't

Re: [Python-Dev] PLY in stdlib (was cffi in stdlib)

2013-07-12 Thread Terry Reedy
On 7/13/2013 12:10 AM, Eric Snow wrote: On Feb 27, 2013 4:31 AM, "Michael Foord" > +1 PLY is capable and well tried-and-tested. We used it in Resolver One to implement a pretty large grammar and it is (in my opinion) best of breed in the Python parser generator world. Being stable and widely

Re: [Python-Dev] Tweaking PEP 8 guidelines for use of leading underscores

2013-07-14 Thread Terry Reedy
On 7/14/2013 7:09 AM, Nick Coghlan wrote: Slight adjustment to the proposed wording to ensure completely undocumented modules are also considered private: = Private interfaces Unless explicitly documented otherwise, a leading underscore on any name indicates that it is an inter

Re: [Python-Dev] Tweaking PEP 8 guidelines for use of leading underscores

2013-07-15 Thread Terry Reedy
On 7/15/2013 12:17 AM, Nick Coghlan wrote: You'd be surprised how many non-core devs react with astonishment when I suggest that not documenting something isn't enough to avoid having users consider it a supported public API - they usually get it after I point out how far you can usually get ju

Re: [Python-Dev] Refactoring test.support into a subpackage

2013-07-15 Thread Terry Reedy
On 7/15/2013 6:22 AM, Nick Coghlan wrote: At the PyCon AU sprints, some of the sprinters worked on a plan Chris Jerdonek and I came up with months ago to convert test.support from a module into a subpackage. This plan arose from some nasty test suite hacks in the lead up to the release of Python

Re: [Python-Dev] Tweaking PEP 8 guidelines for use of leading underscores

2013-07-16 Thread Terry Reedy
On 7/15/2013 11:11 PM, Nick Coghlan wrote: I'll look into adding some stronger wording at the top making it clear that while PEP 8 is a useful starting point and a good default if a project doesn't have a defined style guide of it's own, it is *not* the be-all-and-end-all for Python style guides

Re: [Python-Dev] Misc re.match() complaint

2013-07-16 Thread Terry Reedy
On 7/15/2013 7:14 PM, Guido van Rossum wrote: In a discussion about mypy I discovered that the Python 3 version of the re module's Match object behaves subtly different from the Python 2 version when the target string (i.e. the haystack, not the needle) is a buffer object. In Python 2, the type

Re: [Python-Dev] Misc re.match() complaint

2013-07-16 Thread Terry Reedy
On 7/15/2013 10:20 PM, Guido van Rossum wrote: Or is this something deeper, that a group *is* a new object in principle? No, I just think of it as returning "a string" That is exactly what the doc says it does. See my other post. -- Terry Jan Reedy _

Re: [Python-Dev] Why does PEP 8 advise against explicit relative imports?

2013-07-16 Thread Terry Reedy
On 7/16/2013 7:40 AM, Nick Coghlan wrote: PEP 8 advises developers to use absolute imports rather than explicit relative imports. Why? Using absolute imports couple the internal implementation of a package to its public name - you can't just change the top level directory name any more, you have

Re: [Python-Dev] Tweaking PEP 8 guidelines for use of leading underscores

2013-07-16 Thread Terry Reedy
On 7/16/2013 9:39 AM, R. David Murray wrote: On Tue, 16 Jul 2013 23:19:21 +1000, Steven D'Aprano wrote: For example, pkgutil includes classes with single-underscore methods, which I take as private. It also has a function simplegeneric, which is undocumented and not listed in __all__. In in

Re: [Python-Dev] Misc re.match() complaint

2013-07-17 Thread Terry Reedy
On 7/17/2013 12:15 AM, Stephen J. Turnbull wrote: Terry Reedy writes: > On 7/15/2013 10:20 PM, Guido van Rossum wrote: > > >> Or is this something deeper, that a group *is* a new object in > >> principle? > > > > No, I just think of it as returnin

Re: [Python-Dev] Misc re.match() complaint

2013-07-18 Thread Terry Reedy
On 7/18/2013 9:15 AM, Ezio Melotti wrote: In 3.x "string" means "str", "bytes" means "bytes", "bytes-like object" means "any object that supports the buffer protocol" [0] (including bytes). "string and bytes-like object" includes all of them. I don't think we need to introduce new terms. I a

Re: [Python-Dev] Python 3 as a Default in Linux Distros

2013-07-24 Thread Terry Reedy
On 7/24/2013 5:12 AM, Bohuslav Kabrda wrote: Hi all, in recent days, there has been a discussion on fedora-devel (see thread [1]) about moving to Python 3 as a default. Default-shift is a known natural language phenomenon. https://en.wikipedia.org/wiki/Retronym It is inevitably messy in the mid

Re: [Python-Dev] Coverity Scan

2013-07-25 Thread Terry Reedy
On 7/25/2013 2:48 PM, Christian Heimes wrote: Hello, this is an update on my work and the current status of Coverity Scan. Great work. Maybe you have noticed a checkins made be me that end with the line "CID #". These are checkins that fix an issue that was discovered by the static code ana

Re: [Python-Dev] Coverity Scan

2013-07-25 Thread Terry Reedy
On 7/25/2013 6:00 PM, Terry Reedy wrote: Defect Density:0.05 = defects per thousand lines = 20/400 Anything under 1 is good. The release above reports Samba now at .6. http://www.pcworld.com/article/2038244/linux-code-is-the-benchmark-of-quality-study-concludes.html reports Linux 3.8 as

Re: [Python-Dev] Coverity Scan

2013-07-25 Thread Terry Reedy
On 7/25/2013 6:56 PM, Christian Heimes wrote: Am 26.07.2013 00:32, schrieb Terry Reedy: # Since false positives should stay constant as true positives are reduced toward 0, false / all should tend toward 1 (100%) if I understand the ratio correctly. Which I did not ;-). About 40% of the

Re: [Python-Dev] cpython (2.7): Issue #18441: Make test.support.requires('gui') skip when it should.

2013-07-30 Thread Terry Reedy
On 7/30/2013 1:31 PM, R. David Murray wrote: On Sun, 28 Jul 2013 01:09:43 +0200, terry.reedy wrote: Issue #18441: Make test.support.requires('gui') skip when it should. (Consolidating this check and various checks in tkinter files and moving them to test.support and test.regrtest will be a

Re: [Python-Dev] PEP 8 modernisation

2013-08-01 Thread Terry Reedy
On 8/1/2013 10:34 AM, Alexander Shorin wrote: Hi Nick, On Thu, Aug 1, 2013 at 4:44 PM, Nick Coghlan wrote: 9. Explicit guideline not to assign lambdas to names (use def, that's what it's for) Even for propose to fit chars-per-line limit def f(x): return 2*x f = lambda x: 2*x Three spaces

Re: [Python-Dev] PEP 8 modernisation

2013-08-01 Thread Terry Reedy
On 8/1/2013 10:48 AM, Alexander Shorin wrote: I understand this, but I'm a bit confused about fate of lambdas with such guideline since I see no more reasons to use them with p.9 statement: long lines, code duplicate, no mock and well tests etc. - all these problems could be solved with assigning

Re: [Python-Dev] PEP 8 modernisation

2013-08-01 Thread Terry Reedy
On 8/1/2013 11:03 AM, Alexander Shorin wrote: ...and, if so, why lambda's?(: Without backward compatibility point I see that they are getting "unofficially" deprecated and their usage is dishonoured. Please stop both the top-posting and the FUD. -- Terry Jan Reedy

Re: [Python-Dev] PEP 8 modernisation

2013-08-01 Thread Terry Reedy
On 8/1/2013 11:35 AM, Alexander Belopolsky wrote: Here is one use-case where .. = lambda .. cannot be replaced with def .. op['add'] = lambda x,y: x+y op['mul'] = lambda x, y: x*y Yes, you are binding the functions to named slots, not to names, so not covered by the PEP. Once might still wa

Re: [Python-Dev] Our failure at handling GSoC students

2013-08-06 Thread Terry Reedy
On 8/6/2013 3:26 PM, Antoine Pitrou wrote: I would like to point out that we currently fail at handling GSoC projects and bringing them to completion. One cruel example is the set of PEP 3121 / PEP 384 refactorings done by Robin Schreiber: http://bugs.python.org/issue?%40columns=id%2Cactivity%2

[Python-Dev] Buildbot failure puzzle

2013-08-10 Thread Terry Reedy
At least the following 3.4 buildbots have failed today with an error I do not understand: AMD64 FreeBSD, PPC64, x86Ubuntu, x86 WinServer 2003. Except for the Windows BB, it was the only failure and hence the only reason to not be green. ERROR: test_xmlcharnamereplace (test.test_codeccallbacks.C

[Python-Dev] Green buildbot failure.

2013-08-10 Thread Terry Reedy
This run recorded here shows a green test (it appears to have timed out) http://buildbot.python.org/all/builders/x86%20Windows7%203.x/builds/7017 but the corresponding log for this Windows bot http://buildbot.python.org/all/builders/x86%20Windows7%203.x/builds/7017/steps/test/logs/stdio has the e

Re: [Python-Dev] SSL issues in Python stdlib and 3rd party code

2013-08-13 Thread Terry Reedy
On 8/13/2013 5:06 AM, Christian Heimes wrote: -BEGIN PGP SIGNED MESSAGE- Hash: SHA512 CVE-2013-4238 has been signed to NULL bytes in subjectAltName issue. assigned... http://bugs.python.org/issue18709 http://www.openwall.com/lists/oss-security/2013/08/13/2 Should we assign a C

Re: [Python-Dev] Guidance regarding tests for the standard lib

2013-08-13 Thread Terry Reedy
On 8/13/2013 7:51 PM, Steven D'Aprano wrote: http://bugs.python.org/issue18606 Tests at end of statistics.patch. and I'm about to submit a patch containing my updated code and tests, but I've run into a problem with testing. My existing tests use unittest, and follow the basic boilerplate do

Re: [Python-Dev] Deprecating the formatter module

2013-08-14 Thread Terry Reedy
On 8/14/2013 12:09 PM, Nick Coghlan wrote: On 14 August 2013 11:55, Brett Cannon wrote: I view a deprecation as the same thing. If we leave the module in until Python 4 then I can live with that, but simply moving documentation around is not enough to communicate to those who didn't read the

Re: [Python-Dev] PEP 450 adding statistics module

2013-08-14 Thread Terry Reedy
On 8/14/2013 9:25 PM, Steven D'Aprano wrote: The tests aren't yet integrated with the test runner but are runnable manually. What do you mean? With the changes I gave you, they run fine as part of the test suite. -- Terry Jan Reedy ___ Python-Dev

[Python-Dev] Issue 13248: 3.4 Removals?

2013-08-15 Thread Terry Reedy
Related to the current deprecation discussion: http://bugs.python.org/issue13248 This is a master list of deprecated items scheduled for removal in 3.4. Anything that is going to be removed should be done now, before the next alpha, methinks. -- Terry Jan Reedy __

Re: [Python-Dev] When to remove deprecated stuff

2013-08-15 Thread Terry Reedy
On 8/15/2013 8:29 AM, R. David Murray wrote: A number of us (I don't know how many) have clearly been thinking about "Python 4" as the time when we remove cruft. This will not cause any backward compatibility issues for anyone who has paid heed to the deprecation warnings, but will for those wh

Re: [Python-Dev] PEP 450 adding statistics module

2013-08-15 Thread Terry Reedy
On 8/15/2013 4:16 PM, Eric V. Smith wrote: itertools.chain.from_iterable. But I think that was a mistake, too. As a recent discussion showed, it's not exactly discoverable. The fact that it's not mentioned in the list of functions at the top of the documentation doesn't help. And "chain" is docum

Re: [Python-Dev] PEP 450 adding statistics module

2013-08-15 Thread Terry Reedy
On 8/14/2013 9:25 PM, Steven D'Aprano wrote: Hi all, I have raised a tracker item and PEP for adding a statistics module to the standard library: http://bugs.python.org/issue18606 http://www.python.org/dev/peps/pep-0450/ There has been considerable discussion on python-ideas, I have avoided

Re: [Python-Dev] PEP 450 adding statistics module

2013-08-15 Thread Terry Reedy
On 8/15/2013 10:44 PM, Steven D'Aprano wrote: The most obvious case is datetime: we have datetime(), and datetime.now(), datetime.today(), and datetime.strftime(). The only API difference between it and median is that datetime is a type and median is not, but that's a difference that makes no di

Re: [Python-Dev] Status of 3.2 in Hg repository?

2013-08-21 Thread Terry Reedy
On 8/21/2013 4:52 PM, R. David Murray wrote: On Wed, 21 Aug 2013 14:34:33 -0500, Tim Peters wrote: [Brett] ... After reading that sentence I realize there is a key "not" missing: "I see no reason NOT to help visibly shutter the 3.2. branch ...". IOW I say do the null merge. Sorry about that.

Re: [Python-Dev] please back out changeset f903cf864191 before alpha-2

2013-08-24 Thread Terry Reedy
On 8/24/2013 10:03 AM, Nick Coghlan wrote: I have not used ET or equivalent, but I do have opinions on function names. Looking at the current documentation of ElementTree sets of alarm bells on that front, as it contains the following method descriptions for XMLParser: close() Fi

Re: [Python-Dev] Pre-PEP: Redesigning extension modules

2013-08-24 Thread Terry Reedy
On 8/24/2013 8:51 AM, Stefan Behnel wrote: Antoine Pitrou, 24.08.2013 13:53: This would also imply extension module have to be subclasses of the built-in module type. They can't be arbitrary objects like Stefan proposed. I'm not sure what the latter enables, but it would probably make things mor

Re: [Python-Dev] Pre-PEP: Redesigning extension modules

2013-08-25 Thread Terry Reedy
On 8/25/2013 7:54 AM, Stefan Behnel wrote: And what if you do "from extmodule import some_function" in a Python module? Then reloading couldn't replace that reference, just as for normal Python modules. Meaning that you'd still have to keep both modules properly alive in order to prevent crashes

Re: [Python-Dev] Coverity Scan Spotlight Python

2013-08-29 Thread Terry Reedy
On 8/29/2013 7:24 PM, Sturla Molden wrote: Do the numbers add up? .005 defects in 1,000 lines of code is one defect in every 200,000 lines of code. However they also claim that "to date, the Coverity Scan service has analyzed nearly 400,000 lines of Python code and identified 996 new defects

Re: [Python-Dev] Coverity Scan Spotlight Python

2013-08-30 Thread Terry Reedy
On 8/30/2013 8:18 AM, Christian Heimes wrote: By the way Coverity Scan doesn't understand Python code. It can only analyzes C, C++ and Java code. Have you (or Coverity) thought about which, if any, of the C defect categories apply to Python? (Assuming no use of ctypes ;-). Would it make any

Re: [Python-Dev] cpython: Issue #17741: Rename IncrementalParser and its methods.

2013-08-30 Thread Terry Reedy
On 8/30/2013 9:37 PM, Ryan Gonzalez wrote: I still think non-blocking sounds network-related... But it isn't ;-). Gui apps routinely use event loops and/or threads or subprocesses to avoid blocking on either user input (which can come from keyboard or mouse) and maybe disk operations and calc

[Python-Dev] 'Subinterpreter' (was Re: Pre-PEP: Redesigning extension modules)

2013-09-01 Thread Terry Reedy
Speaking of which, it also doesn't work (well) with subinterpreters: Could someone briefly explain 'subinterpreter' or point me somewhere in the docs? It appears throughout this thread but there is no index or glossary entry. -- Terry Jan Reedy

Re: [Python-Dev] cpython (merge 3.3 -> default): Merge fix from 3.3 into default.

2013-09-01 Thread Terry Reedy
On 9/1/2013 5:04 PM, Antoine Pitrou wrote: On Sun, 1 Sep 2013 23:02:17 +0200 (CEST) tim.peters wrote: Windows developers: to get the correct line endings in your checkout, delete Lib\test\xmltestdata, and then "hg revert" that directory. Or, in Tortoisehg Workbenck, select the four Workin

Re: [Python-Dev] 'Subinterpreter' (was Re: Pre-PEP: Redesigning extension modules)

2013-09-01 Thread Terry Reedy
On 9/1/2013 5:13 PM, Stefan Behnel wrote: Antoine Pitrou, 01.09.2013 22:06: On Sun, 01 Sep 2013 16:02:33 -0400 Terry Reedy wrote: Speaking of which, it also doesn't work (well) with subinterpreters: Could someone briefly explain 'subinterpreter' or point me somewhere in the d

Re: [Python-Dev] [Python-checkins] cpython: Update whatsnew/3.4.rst wrt. the socket constants switch to IntEnum

2013-09-01 Thread Terry Reedy
On 9/1/2013 6:59 PM, Eli Bendersky wrote: On Sat, Aug 31, 2013 at 4:52 PM, Terry Reedy mailto:tjre...@udel.edu>> wrote: On 8/31/2013 6:19 PM, eli.bendersky wrote: [issue #18730] Wrong issue number I think. ___ Oop

Re: [Python-Dev] unicodedata module is out of date

2013-09-06 Thread Terry Reedy
On 9/6/2013 11:55 AM, Andrew Miller wrote: I've just checked on Python 2.7.5 and Python 3.3.2 (Win32 versions). In Python 3.3.2 unicodedata.unidata_version is set to '6.1.0'. In Python 2.7.5 it is set to '5.2.0' so it looks as though this version is no longer being updated. In general, new fe

Re: [Python-Dev] PEP 450 adding statistics module

2013-09-09 Thread Terry Reedy
On 9/8/2013 5:41 PM, Guido van Rossum wrote: On Sun, Sep 8, 2013 at 1:48 PM, Oscar Benjamin wrote: On 8 September 2013 18:32, Guido van Rossum wrote: Going over the open issues: - Parallel arrays or arrays of tuples? I think the API should require an array of tuples. It is trivial to zip up

Re: [Python-Dev] PEP 450 adding statistics module

2013-09-09 Thread Terry Reedy
On 9/8/2013 10:57 PM, Stephen J. Turnbull wrote: I don't necessarily find this persuasive. It's more common when working with existing databases that you add variables than add observations. My experience with general scientific research is the opposite. One decides on the variables to measu

Re: [Python-Dev] Need testing audio files

2013-09-11 Thread Terry Reedy
On 9/11/2013 10:10 AM, Barry Warsaw wrote: On Sep 11, 2013, at 01:09 PM, Serhiy Storchaka wrote: In ideal it should be one high-quality (float64?) multichannel (5+1?) but short master file and it's lower-quality copies made by third-party tools. In ideal the content should be related to Python.

Re: [Python-Dev] [Python-checkins] cpython: Issue #18937: Add an assertLogs() context manager to unittest.TestCase to

2013-09-14 Thread Terry Reedy
On 9/14/2013 1:45 PM, antoine.pitrou wrote: http://hg.python.org/cpython/rev/4f5815747f58 changeset: 85701:4f5815747f58 user:Antoine Pitrou date:Sat Sep 14 19:45:47 2013 +0200 summary: Issue #18937: Add an assertLogs() context manager to unittest.TestCase to ensure that a b

Re: [Python-Dev] PEP 428: Pathlib -> stat caching

2013-09-16 Thread Terry Reedy
On 9/16/2013 4:14 PM, R. David Murray wrote: Well, we tend to avoid single boolean arguments in favor of differently named functions. The stdlib has lots of boolean arguments. My impression is that they are to be avoided when they would change the return type or otherwise do something disjoi

[Python-Dev] License() release list is imcomplete; intentional?

2013-09-17 Thread Terry Reedy
On 2.7, >>> license() return a text that includes a complete list of releases from 1.6 to 2.7 and stops there Release Derived YearOwner GPL- fromcompatible? (1) 0.9.0 thru 1.2 1991-1995 CWI

Re: [Python-Dev] License() release list is imcomplete; intentional?

2013-09-17 Thread Terry Reedy
On 9/17/2013 11:48 AM, MRAB wrote: On 17/09/2013 16:37, Terry Reedy wrote: On 2.7, >>> license() return a text that includes a complete list of releases from 1.6 to 2.7 and stops there Release Derived YearOwner GPL-

[Python-Dev] Revert #12085 fix for __del__ attribute error message

2013-09-21 Thread Terry Reedy
When an AttributeError is raised in a __del__ method, it is caught and ignored, except that it is not completely ignored but is replaced by a warning message sent to stderr. Example: >>> class C(): def __del__(self): raise AttributeError >>> c=C() >>> del c Exception AttributeEr

Re: [Python-Dev] Revert #12085 fix for __del__ attribute error message

2013-09-21 Thread Terry Reedy
On 9/21/2013 6:15 PM, R. David Murray wrote: On Sat, 21 Sep 2013 17:16:41 -0400, Terry Reedy wrote: When an AttributeError is raised in a __del__ method, it is caught and ignored, except that it is not completely ignored but is replaced by a warning message sent to stderr. Example: >>&

Re: [Python-Dev] Revert #12085 fix for __del__ attribute error message

2013-09-22 Thread Terry Reedy
On 9/21/2013 10:30 PM, Guido van Rossum wrote: Exceptions in __del__ point to bugs (sometimes in the stdlib) that should be fixed, period. The only reason they do not result in exceptions that are properly bubbled up and catchable is because __del__ is called from a DECREF macro which has no retu

Re: [Python-Dev] Best practice for documentation for std lib

2013-09-22 Thread Terry Reedy
On 9/22/2013 10:25 AM, Nick Coghlan wrote: As Georg noted, we'd have to do some fancy footwork to make sure autodoc didn't pick up the wrong module versions for the standard library docs, though. Is that a one-time nuisance, a per-module nuisance, a per-autodoc-use nuisance, or a per-build nu

Re: [Python-Dev] Revert #12085 fix for __del__ attribute error message

2013-09-22 Thread Terry Reedy
On 9/22/2013 2:41 PM, Guido van Rossum wrote: On Sun, Sep 22, 2013 at 10:35 AM, Terry Reedy mailto:tjre...@udel.edu>> wrote: On 9/21/2013 10:30 PM, Guido van Rossum wrote: Exceptions in __del__ point to bugs (sometimes in the stdlib) that should be fixed, period. Th

Re: [Python-Dev] Best practice for documentation for std lib

2013-09-22 Thread Terry Reedy
On 9/22/2013 10:04 PM, Guido van Rossum wrote: If I had the final word, I'd recommend using the current docstrings as the .rst contents and replacing the docstrings with the 1-2 line function descriptions from the PEP, e.g.: * median(data) -> median (middle value) of data, taking t

Re: [Python-Dev] Best practice for documentation for std lib

2013-09-23 Thread Terry Reedy
On 9/23/2013 11:18 AM, Skip Montanaro wrote: It would be great if the docstring contained a link to the online documentation. That would have to be a feature of help(), not hardcoded in each docstring. That *is* a feature of the help function: Help on built-in module sys: help(sys) NAME

Re: [Python-Dev] Best practice for documentation for std lib

2013-09-23 Thread Terry Reedy
On 9/23/2013 10:56 AM, Guido van Rossum wrote: I think 60 is just a guideline. In stdlib .py source code I want it not to extend beyond the 79th column (see recent PEP 8 argument). For a PEP 8 says "Limit all lines to a maximum of 79 characters. For flowing long blocks of text with fewer stru

Re: [Python-Dev] Best practice for documentation for std lib

2013-09-23 Thread Terry Reedy
On 9/22/2013 10:44 PM, Guido van Rossum wrote: Glad you like it. I still do, too, but I've given up hope to convince all core developers to stick to this style. :-( >[me] ('Return' rather than 'Returns' is the current convention.) That's actually a religious argument which in the stdlib tak

Re: [Python-Dev] Revert #12085 fix for __del__ attribute error message

2013-09-23 Thread Terry Reedy
On 9/23/2013 12:23 PM, R. David Murray wrote: On Mon, 23 Sep 2013 17:22:45 +0200, Antoine Pitrou wrote: On Mon, 23 Sep 2013 18:51:04 +1000 Nick Coghlan wrote: On 23 September 2013 18:45, Antoine Pitrou wrote: Le Mon, 23 Sep 2013 18:17:51 +1000, Nick Coghlan a écrit : Here's what I sugges

Re: [Python-Dev] Revert #12085 fix for __del__ attribute error message

2013-09-26 Thread Terry Reedy
On 9/26/2013 3:17 AM, Nick Coghlan wrote: On 26 September 2013 16:53, Georg Brandl wrote: Sure, that's doable, but it dumps the full repr of "obj" in the middle of the sentence. The thing that's not practical is the neat and tidy wording Georg proposed, because the thing passed as "obj" is actu

Re: [Python-Dev] PEP 453 (pip bootstrapping) ready for pronouncement?

2013-09-27 Thread Terry Reedy
On 9/27/2013 10:26 AM, Paul Moore wrote: [snip longish post] I want to summarize the main points of what I believe Paul said and strongly agree with them. * For this issue, and especially for backporting to 2.7/3.3, we should consider Windows, Mac, and *nix distributions as separate cases. *

Re: [Python-Dev] PEP 453 (pip bootstrapping) ready for pronouncement?

2013-09-27 Thread Terry Reedy
On 9/27/2013 3:10 PM, Donald Stufft wrote: On Sep 27, 2013, at 2:50 PM, Terry Reedy wrote: I add: for 2.7/3.3, there is consequently no need for _ensurepip to be in /Lib after installation, even if temporarily added*. If it is not there, there is no change the the stdlib, and hence no

Re: [Python-Dev] toolbar

2013-09-28 Thread Terry Reedy
On 9/28/2013 7:28 AM, Kevin Ngugi wrote: Hi, I just downloaded Python 3.3 top teach myself how to program, I am new to programming, but the guide I am using requires me to access the toolbar, which I cannot seem to find. How do I find it and have it displayed on the interface? I tried v 3.1 but i

Re: [Python-Dev] Best practice for documentation for std lib

2013-09-28 Thread Terry Reedy
On 9/22/2013 10:44 PM, Guido van Rossum wrote: On Sun, Sep 22, 2013 at 7:25 PM, Terry Reedy ('Return' rather than 'Returns' is the current convention.) That's actually a religious argument which in the stdlib takes no strict position -- a quick grep shows tha

Re: [Python-Dev] PEP 457: Syntax For Positional-Only Parameters

2013-10-08 Thread Terry Reedy
On 10/8/2013 9:31 PM, Benjamin Peterson wrote: 2013/10/8 Larry Hastings : This PEP proposes a backwards-compatible syntax that should permit implementing any builtin in pure Python code. This is rather too strong. You can certainly implement them; you just have to implement the argument parsin

Re: [Python-Dev] PEP 457: Syntax For Positional-Only Parameters

2013-10-09 Thread Terry Reedy
On 10/9/2013 9:51 AM, Larry Hastings wrote: Again, I don't expect this syntax to be implemented any time soon. But this does raise a mild sore point: Maciej and Armin Rigo tell me that PyPy's implementation of range() looks like this: def range(x, y=None, step=None): The "None" above is no

Re: [Python-Dev] PEP 457: Syntax For Positional-Only Parameters

2013-10-09 Thread Terry Reedy
On 10/9/2013 1:05 PM, Larry Hastings wrote: First, if you're proposing to change the signature of range()... well, good luck. Any proposals I made like that got shot down almost immediately. I /think/ Guido said somewhere "range isn't changing. deal with it.", though I admit I don't have a ref

Re: [Python-Dev] [Python-checkins] peps: Revise PEP 453 to be docs-only for 2.7 & 3.3

2013-10-10 Thread Terry Reedy
On 10/10/2013 10:48 AM, nick.coghlan wrote: http://hg.python.org/peps/rev/405b80d54b7d changeset: 5188:405b80d54b7d user:Nick Coghlan date:Fri Oct 11 00:47:47 2013 +1000 summary: Revise PEP 453 to be docs-only for 2.7 & 3.3 - all functional changes are now 3.4 only - still

Re: [Python-Dev] Python IDEL issue

2013-10-11 Thread Terry Reedy
On 10/11/2013 3:37 AM, Hu, Hao (NSN - CN/Beijing) wrote: This list is for development *of* Python and CPython. Usage questions should be directed elsewhere, such as python-list. Idle questions can be directed to the idle-sig list. Both can be accessed through news.gmane.org as gmane.comp.pytho

Re: [Python-Dev] cpython: Rename contextlib.ignored() to contextlib.ignore().

2013-10-11 Thread Terry Reedy
On 10/11/2013 8:04 AM, Serhiy Storchaka wrote: 11.10.13 13:33, Eric V. Smith написав(ла): And Antoine has again taught me a new word: polysemic: having more than one meaning; having multiple meanings There is no such word in my dictionaries. :( Only polysemous and polysemantic. http://www.me

Re: [Python-Dev] Regarding stdlib socket module, _fileobject.flush() method using ._rbufsize instead of ._wbufsize

2013-10-16 Thread Terry Reedy
On 10/16/2013 5:01 PM, Peter Portante wrote: Hello, Is there a reason why the stdlib socket module _fileobject.flush() method is using ._rbufsize instead of ._wbufsize at line 297 (Python 2.7.3), where it determines the buffer_size value to be used for _sock.sendall()? Does anybody know the his

Re: [Python-Dev] On suppress()'s trail blazing (was Re: cpython: Rename contextlib.ignored() to contextlib.ignore())

2013-10-17 Thread Terry Reedy
On 10/17/2013 12:06 PM, Barry Warsaw wrote: On Oct 18, 2013, at 01:26 AM, Nick Coghlan wrote: By contrast, suppress() and redirect_stdout() are the *first* general purpose context managers added to contextlib since its incarnation in Python 2.5 (although there have been many various domain spec

Re: [Python-Dev] On suppress()'s trail blazing (was Re: cpython: Rename contextlib.ignored() to contextlib.ignore())

2013-10-17 Thread Terry Reedy
On 10/17/2013 7:35 PM, Nick Coghlan wrote: On 18 Oct 2013 06:59, "Xavier Morel" mailto:catch-...@masklinn.net>> wrote: > > On 2013-10-17, at 22:11 , Ethan Furman wrote: > > > On 10/17/2013 01:03 PM, Terry Reedy wrote: > >> > >> class

Re: [Python-Dev] The Tulip Has Landed

2013-10-18 Thread Terry Reedy
On 10/18/2013 4:10 AM, Paul Moore wrote: On 17 October 2013 23:40, Larry Hastings wrote: For those interested parties: Guido just checked "asyncio", aka "Tulip", aka "PEP 3156", in to trunk. I expect it to be part of Python 3.4.0a4, hopefully to be released this weekend. Cool! How often do t

Re: [Python-Dev] PEP: Ordered Class Definition Namespace

2016-06-07 Thread Terry Reedy
On 6/7/2016 1:51 PM, Eric Snow wrote: Note: just to be clear, this PEP is *not* about changing > ``type.__dict__`` to ``OrderedDict``. By 'type', do you mean the one and one objected named 'type or the class being defined? To be really clear, will the following change? >>> class C: pass >

Re: [Python-Dev] PEP 520: Ordered Class Definition Namespace

2016-06-08 Thread Terry Reedy
On 6/8/2016 4:07 AM, Victor Stinner wrote: Abstract This PEP changes the default class definition namespace to ``OrderedDict``. Furthermore, the order in which the attributes are defined in each class body will now be preserved in ``type.__definition_order__``. This allows introspectio

Re: [Python-Dev] BDFL ruling request: should we block forever waiting for high-quality random bits?

2016-06-09 Thread Terry Reedy
On 6/9/2016 9:48 AM, Doug Hellmann wrote: On Jun 9, 2016, at 9:27 AM, Cory Benfield wrote: The problem here is that both definitions of ‘broken’ are unclear. If we leave os.urandom() as it is, there is a small-but-nonzero change that your program will hang, potentially indefinitely. If we c

Re: [Python-Dev] Stop using timeit, use perf.timeit!

2016-06-10 Thread Terry Reedy
On 6/10/2016 9:20 AM, Steven D'Aprano wrote: On Fri, Jun 10, 2016 at 01:13:10PM +0200, Victor Stinner wrote: Hi, Last weeks, I made researchs on how to get stable and reliable benchmarks, especially for the corner case of microbenchmarks. The first result is a serie of article, here are the fir

Re: [Python-Dev] Stop using timeit, use perf.timeit!

2016-06-10 Thread Terry Reedy
On 6/10/2016 11:07 AM, Victor Stinner wrote: I started to work on visualisation. IMHO it helps to understand the problem. Let's create a large dataset: 500 samples (100 processes x 5 samples): As I finished by response to Steven, I was thinking you should do something like this to get real da

<    3   4   5   6   7   8   9   10   11   12   >