Re: [Python-Dev] python symbolizition

2013-06-14 Thread R. David Murray
This discussion is better suited for python-ideas than it is for python-dev. On Fri, 14 Jun 2013 16:50:53 +0200, Markus Unterwaditzer wrote: > But why? > > -- Markus (from phone) > > Pynix Wang wrote: > >1.lambda expression > > > >c# > >a.(x, y) => x == y > >b.() => SomeMethod() > > > >ruby:

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-14 Thread R. David Murray
On Fri, 14 Jun 2013 21:12:00 +0200, Martin Schultz wrote: > 2. Testing for empty lists or empty ndarrays: > > In principle, `len(x) == 0` will do the trick. **BUT** there are several > caveats here: >- `len(scalar)` raises a TypeError, so you will have to use try and > except or find some ot

Re: [Python-Dev] Problem with pydoc script in PEP 405 venvs

2013-06-17 Thread R. David Murray
On Mon, 17 Jun 2013 16:27:45 -, Vinay Sajip wrote: > Issue #18224 (http://bugs.python.org/issue18224) highlights a problem on > Windows with the pydoc script provided with venvs created by pyvenv. On > POSIX, the script is named pydoc and causes no problems: on Windows, it is > called pydoc.py

Re: [Python-Dev] [Python-checkins] cpython (3.3): Add -b and -X options to python man page.

2013-06-23 Thread R. David Murray
On Sun, 23 Jun 2013 17:40:13 +0200, Maciej Fijalkowski wrote: > On Thu, Jun 20, 2013 at 3:36 PM, Brett Cannon wrote: > > On Wed, Jun 19, 2013 at 11:20 PM, senthil.kumaran > > wrote: > >> .TP > >> +.BI "\-X " option > >> +Set implementation specific option. > > > > > > Should probably be "Set th

Re: [Python-Dev] [Python-checkins] cpython (3.3): Add -b and -X options to python man page.

2013-06-24 Thread R. David Murray
On Mon, 24 Jun 2013 22:14:46 +0200, Maciej Fijalkowski wrote: > On Sun, Jun 23, 2013 at 6:14 PM, R. David Murray > wrote: > > On Sun, 23 Jun 2013 17:40:13 +0200, Maciej Fijalkowski > > wrote: > >> On Thu, Jun 20, 2013 at 3:36 PM, Brett Cannon wrote: > >>

Re: [Python-Dev] Relative path in co_filename for zipped modules

2013-06-25 Thread R. David Murray
Please file this as a bug report on bugs.python.org so that it doesn't get lost. See also http://bugs.python.org/issue13328 (which looks like a different bug but could also be causing you problems). --David On Wed, 26 Jun 2013 00:11:04 +0400, Vitaly Murashev wrote: > Dear Python developers com

Re: [Python-Dev] End of the mystery "@README.txt Mercurial bug"

2013-06-26 Thread R. David Murray
On Wed, 26 Jun 2013 09:39:54 -0400, Barry Warsaw wrote: > On Jun 26, 2013, at 09:04 AM, Eric V. Smith wrote: > > >I run 'make distclean' fairly often, but maybe it's just out of habit. > >If I'm adding/deleting modules, I want to make sure there are no build > >artifacts. And since I have modifie

Re: [Python-Dev] [Python-checkins] peps: Reject PEP 315.

2013-06-26 Thread R. David Murray
On Wed, 26 Jun 2013 17:39:07 +0200, lukasz.langa wrote: > -Deferred; see > +Rejected; see > +http://mail.python.org/pipermail/python-ideas/2013-June/021610.html > + > +This PEP has been deferred since 2006; see > http://mail.python.org/pipermail/python-dev/2006-February/06071

Re: [Python-Dev] [Python-checkins] cpython: Fix memory leak in pyexpat PyUnknownEncodingHandler

2013-06-29 Thread R. David Murray
I don't know if this is the commit at fault or not, but we are seeing segfaults in test_xml_etree on the buildbots now. --David On Sat, 29 Jun 2013 20:43:22 +0200, christian.heimes wrote: > http://hg.python.org/cpython/rev/bd0834b59828 > changeset: 84375:bd0834b59828 > user:Christian

Re: [Python-Dev] End of the mystery "@README.txt Mercurial bug"

2013-07-01 Thread R. David Murray
On Mon, 01 Jul 2013 08:33:38 +0200, Georg Brandl wrote: > Am 26.06.2013 16:24, schrieb Victor Stinner: > > 2013/6/26 Eric V. Smith : > >> I think that's exactly what's happening. > >> > >> From the bug report: > >> > >> find $(srcdir) '(' -name '*.fdc' -o -name '*~' \ > >>

Re: [Python-Dev] End of the mystery "@README.txt Mercurial bug"

2013-07-01 Thread R. David Murray
On Mon, 01 Jul 2013 23:05:56 +0200, Victor Stinner wrote: > Hi Georg, > > 2013/7/1 Georg Brandl : > > Am 26.06.2013 16:24, schrieb Victor Stinner: > >> 2013/6/26 Eric V. Smith : > >>> I think that's exactly what's happening. > >>> > >>> From the bug report: > >>> > >>> find $(srcdir) '('

Re: [Python-Dev] Issue 18312 "fix" broke buildbots

2013-07-02 Thread R. David Murray
On Tue, 02 Jul 2013 09:52:56 -0400, "Eric V. Smith" wrote: > I'm not sure how my change broke the buildbots, but apparently it did. I > need to run to a meeting now, but I can roll this back in the next few > hours. > > If someone else wants to roll it back before I get to it, feel free. > > Sor

Re: [Python-Dev] Solving the import-deadlock case

2013-07-02 Thread R. David Murray
On Tue, 02 Jul 2013 20:31:48 +0200, Pascal Chambon wrote: > I agree that a module loading should be, as much as possible, "side > effects free", and thus shouldn't have temporary errors. But well, in > practice, module loading is typically the time where process-wide > initialization are done (

Re: [Python-Dev] [Python-checkins] cpython (3.3): Issue #17860: explicitly mention that std* streams are opened in binary mode by

2013-07-06 Thread R. David Murray
On Sat, 06 Jul 2013 10:25:19 +0200, ronald.oussoren wrote: > http://hg.python.org/cpython/rev/a2c2ffa1a41c > changeset: 84453:a2c2ffa1a41c > branch: 3.3 > parent: 84449:df79735b21c1 > user:Ronald Oussoren > date:Sat Jul 06 10:23:59 2013 +0200 > summary: > Issue #178

Re: [Python-Dev] [Python-checkins] cpython (3.3): Issue #17860: explicitly mention that std* streams are opened in binary mode by

2013-07-06 Thread R. David Murray
On Sat, 06 Jul 2013 08:14:26 -0700, "Gregory P. Smith" wrote: > Please update the docstring in subprocess.py with the wording improvements > that you settle on while you're at it. > > On Sat, Jul 6, 2013 at 6:03 AM, Ronald Oussoren wrote: > > I didn't like the parenthentical after all. Would this

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

2013-07-06 Thread R. David Murray
On Sun, 07 Jul 2013 04:48:18 +0200, Larry Hastings wrote: > On 07/07/2013 03:04 AM, Nick Coghlan wrote: > > > > On 7 Jul 2013 10:25, "Larry Hastings" > > wrote: > > >> > > >> group > > >>> > > >>> If not None, represents which "optional parameter group" this > > parame

Re: [Python-Dev] Python 3.4 and Windows XP: just 45 days until EOL

2013-07-11 Thread R. David Murray
On Fri, 12 Jul 2013 13:49:54 +1200, Ben Hoyt wrote: > I guess it has to be dropped at some stage, but with Windows XP it's a case > of "XP is dead. Long live XP!" There are still an awful lot of XP boxes out > there, and I'd kind hate to see support dropped completely. We still use it > here at ho

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

2013-07-16 Thread R. David Murray
On Tue, 16 Jul 2013 23:19:21 +1000, Steven D'Aprano wrote: > On 16/07/13 20:28, Richard Oudkerk wrote: > > On 16/07/2013 6:44am, Nick Coghlan wrote: > >> Clarifying what constitutes an internal interface in a way that > >> doesn't require renaming anything is a necessary prerequisite for > >> bund

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

2013-07-17 Thread R. David Murray
On Tue, 16 Jul 2013 17:46:34 -0400, Terry Reedy wrote: > 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, > >&g

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

2013-07-21 Thread R. David Murray
On Mon, 22 Jul 2013 02:13:47 +0200, terry.reedy wrote: > +# If buildbot improperly sets gui resource (#18365, #18441), remove it > +# so requires('gui') tests are skipped while non-gui tests still run. > +if use_resources and 'gui' in use_resources: Note that the buildbot cannot "improperly" set

Re: [Python-Dev] MyOpenID.com no longer supported

2013-07-29 Thread R. David Murray
On Mon, 29 Jul 2013 08:08:30 -0700, Guido van Rossum wrote: > On Mon, Jul 29, 2013 at 12:55 AM, Ethan Furman wrote: > > Excerpt from http://meta.stackoverflow.com/q/190442/176681: > > > > Janrain no longer actively supports MyOpenID, and announced on Twitter that > > their users should proceed wi

Re: [Python-Dev] C code coverage report with lcov

2013-07-29 Thread R. David Murray
On Mon, 29 Jul 2013 13:58:55 -0400, Brett Cannon wrote: > On Mon, Jul 29, 2013 at 1:15 PM, Christian Heimes wrote: > > > Hi, > > > > I have done some experiments with GCC's gcov and lcov to get the C code > > coverage of our unit test suite. You may find today's report at > > > > http://tiran.b

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

2013-07-30 Thread R. David Murray
On Sun, 28 Jul 2013 01:09:43 +0200, terry.reedy wrote: > http://hg.python.org/cpython/rev/dd9941f5fcda > changeset: 84870:dd9941f5fcda > branch: 2.7 > parent: 84865:c0788ee86a65 > user:Terry Jan Reedy > date:Sun Jul 21 20:13:24 2013 -0400 > summary: > Issue #18441:

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

2013-07-30 Thread R. David Murray
On Tue, 30 Jul 2013 20:52:27 -0400, Terry Reedy wrote: > On 7/30/2013 1:31 PM, R. David Murray wrote: > > On Sun, 28 Jul 2013 01:09:43 +0200, terry.reedy > > wrote: > > I believe that this logic is incorrect. > > It works for the intended purpose. > > > If

Re: [Python-Dev] to rename or not...

2013-07-31 Thread R. David Murray
On Wed, 31 Jul 2013 20:39:10 +1200, Greg Ewing wrote: > Ronald Oussoren wrote: > > * Add 'load', 'loads', 'dump' and 'dumps', those use "bytes" for binary data > > by default > > > > * Keep and deprecate "readPlist", "writePlist" and the their string > > equivalents, those still use Data objects

Re: [Python-Dev] PEP 8 modernisation

2013-08-01 Thread R. David Murray
On Thu, 01 Aug 2013 09:16:13 -0400, Fred Drake wrote: > On Thu, Aug 1, 2013 at 9:10 AM, Antoine Pitrou wrote: > > Something magic about 99? > > I'm guessing it's short enough you can say you tried, but long > enough to annoy traditionalists anyway. > > I'm annoyed already. :-) +1 :) My termi

Re: [Python-Dev] PEP 8 modernisation

2013-08-01 Thread R. David Murray
On Thu, 01 Aug 2013 16:53:16 +0200, Ronald Oussoren wrote: > On 1 Aug, 2013, at 16:48, 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, n

Re: [Python-Dev] PEP 8 modernisation

2013-08-01 Thread R. David Murray
On Thu, 01 Aug 2013 11:35:38 -0400, Barry Warsaw wrote: > So I would greatly prefer that stdlib files be kept to the 79 character > limit. I see most violations of this in the library documents, but especially > there, paragraphs should be wrapped to 79 characters, and can easily be done > withou

Re: [Python-Dev] unittest.TestSuite holding references to unittest.TestCase instances too long

2013-08-03 Thread R. David Murray
On Sat, 03 Aug 2013 10:27:30 -0400, Matt McClure wrote: > Michael Foord voidspace.org.uk> writes: > > On 2 Aug 2013, at 19:19, Antoine Pitrou pitrou.net> wrote: > > > The patch is basically ready for commit, except for a possible doc > > > addition, no? > > > > Looks to be the case, reading the

Re: [Python-Dev] Allowing to run certain regression tests in subprocesses

2013-08-03 Thread R. David Murray
On Sat, 03 Aug 2013 16:47:37 -0700, Eli Bendersky wrote: > On Sat, Aug 3, 2013 at 4:36 PM, Eli Bendersky wrote: > > Hi All, > > > > Today the issue of cross-test global env dependencies showed its ugly > > head again for me. I recall a previous discussion > > (http://mail.python.org/pipermail/pyt

Re: [Python-Dev] Allowing to run certain regression tests in subprocesses

2013-08-04 Thread R. David Murray
On Sat, 03 Aug 2013 19:04:21 -0700, Eli Bendersky wrote: > On Sat, Aug 3, 2013 at 6:57 PM, R. David Murray wrote: > > On Sat, 03 Aug 2013 16:47:37 -0700, Eli Bendersky wrote: > >> On Sat, Aug 3, 2013 at 4:36 PM, Eli Bendersky wrote: > >> > Hi All, > >>

Re: [Python-Dev] The Return Of Argument Clinic

2013-08-06 Thread R. David Murray
On Mon, 05 Aug 2013 16:53:39 -0700, Larry Hastings wrote: > Let me put it this way: Which is more surprising to the person > unfamiliar with the code? That this __init__ doesn't get all the > parameters, and the base class __init__ is getting called > automatically? Or that this funny functio

Re: [Python-Dev] When to remove deprecated stuff (was: Deprecating the formatter module)

2013-08-15 Thread R. David Murray
On Thu, 15 Aug 2013 11:22:14 +0200, Antoine Pitrou wrote: > On Thu, 15 Aug 2013 11:16:20 +0200 > Victor Stinner wrote: > > 2013/8/15 Antoine Pitrou : > > > We don't have any substantial change in store for an eventual "Python > > > 4", so it's quite a remote hypothesis right now. > > > > I prefe

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

2013-08-15 Thread R. David Murray
On Thu, 15 Aug 2013 14:10:39 -0400, "Eric V. Smith" wrote: > On 08/15/2013 01:58 PM, Mark Dickinson wrote: > > On Thu, Aug 15, 2013 at 2:08 PM, Steven D'Aprano > > wrote: > > > > > > - Each scheme ended up needing to be a separate function, for ease > > of bo

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

2013-08-15 Thread R. David Murray
On Thu, 15 Aug 2013 13:34:12 -0400, Terry Reedy wrote: > 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 > > back

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

2013-08-15 Thread R. David Murray
On Thu, 15 Aug 2013 23:28:39 +0300, Michael Foord wrote: > > On 15 Aug 2013, at 21:10, "Eric V. Smith" wrote: > > > On 08/15/2013 01:58 PM, Mark Dickinson wrote: > >> On Thu, Aug 15, 2013 at 2:08 PM, Steven D'Aprano >> > wrote: > >> > >> > >>- Each scheme end

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

2013-08-20 Thread R. David Murray
On Tue, 20 Aug 2013 10:43:57 -0500, Tim Peters wrote: > [Tim] > >> > hg log -r 3.2 > >> changeset: 83826:b9b521efeba3 > >> branch: 3.2 > >> parent: 83739:6255b40c6a61 > >> user:Antoine Pitrou > >> date:Sat May 18 17:56:42 2013 +0200 > >> summary: Issue #17980: Fix

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

2013-08-21 Thread R. David Murray
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. > > No problem! Since I've bee

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

2013-08-21 Thread R. David Murray
On Wed, 21 Aug 2013 16:59:36 -0400, Terry Reedy wrote: > 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 "n

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

2013-08-22 Thread R. David Murray
On Thu, 22 Aug 2013 16:45:29 +0300, Michael Foord wrote: > > On 22 Aug 2013, at 14:00, Petri Lehtinen wrote: > > > Terry Reedy wrote: > >> On 8/15/2013 8:29 AM, R. David Murray wrote: > >> > >>> A number of us (I don't know how many) have c

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

2013-08-22 Thread R. David Murray
On Thu, 22 Aug 2013 20:00:14 +0200, Ezio Melotti wrote: > On Thu, Aug 22, 2013 at 4:43 PM, R. David Murray > wrote: > > On Thu, 22 Aug 2013 16:45:29 +0300, Michael Foord > > wrote: > >> > >> On 22 Aug 2013, at 14:00, Petri Lehtinen wrote: > >> &g

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

2013-08-24 Thread R. David Murray
On Sat, 24 Aug 2013 14:53:13 +0200, Antoine Pitrou wrote: > On Sat, 24 Aug 2013 14:46:32 +0200 > Stefan Behnel wrote: > > > > As I said, the only reason why the current implementation is there is > > "because it's there". > > No. It works, it's functional, it fills an use case, and it doesn't s

Re: [Python-Dev] Can someone try to duplicate corruption on Gentoo?

2013-08-29 Thread R. David Murray
On Thu, 29 Aug 2013 18:43:13 -0500, Tim Peters wrote: > In > > http://bugs.python.org/issue18843 > > a user reported a debug PyMalloc "bad leading pad byte" memory > corruption death while running their code. After some thrashing, they > decided to rebuild Python, and got the same kind of e

[Python-Dev] Completing the email6 API changes.

2013-08-30 Thread R. David Murray
If you've read my blog (eg: on planet python), you will be aware that I dedicated August to full time email package development. At the beginning of the month I worked out a design proposal for the remaining API additions to the email package, dealing with handling message bodies in a more natural

Re: [Python-Dev] Completing the email6 API changes.

2013-08-31 Thread R. David Murray
On Sat, 31 Aug 2013 20:37:30 +1000, Steven D'Aprano wrote: > On 31/08/13 15:21, R. David Murray wrote: > > If you've read my blog (eg: on planet python), you will be aware that > > I dedicated August to full time email package development. > [...] > > > The

Re: [Python-Dev] Completing the email6 API changes.

2013-08-31 Thread R. David Murray
On Sat, 31 Aug 2013 18:57:56 +0900, "Stephen J. Turnbull" wrote: > R. David Murray writes: > > > But I would certainly appreciate review from anyone so moved, since I > > haven't gotten any yet. > > I'll try to make time for a serious (but obviousl

Re: [Python-Dev] Completing the email6 API changes.

2013-09-01 Thread R. David Murray
On Sun, 01 Sep 2013 00:18:59 +0900, "Stephen J. Turnbull" wrote: > R. David Murray writes: > > > Full validation is something that is currently a "future > > objective". > > I didn't mean it to be anything else. :-) > > > The

Re: [Python-Dev] Completing the email6 API changes.

2013-09-01 Thread R. David Murray
On Sat, 31 Aug 2013 18:57:56 +0900, "Stephen J. Turnbull" wrote: > R. David Murray writes: > > > But I would certainly appreciate review from anyone so moved, since I > > haven't gotten any yet. > > I'll try to make time for a serious (but obvious

Re: [Python-Dev] Completing the email6 API changes.

2013-09-02 Thread R. David Murray
On Mon, 02 Sep 2013 16:06:53 +0900, "Stephen J. Turnbull" wrote: > > Glenn writes: > > > Steve writes: > > >> OTOH, if the message is structured > >> > >> multipart/related > >> multipart/alternative > >> text/plain > >> text/html > >> ima

Re: [Python-Dev] Completing the email6 API changes.

2013-09-02 Thread R. David Murray
On Mon, 02 Sep 2013 15:52:59 -0700, Glenn Linderman wrote: > MUAs tend to be able to display what they produce themselves, but I have > situations where they don't handle what other MUAs produce. > > One nice thing about this email6 toolkit might be the ability to > produce, more easily than b

Re: [Python-Dev] Completing the email6 API changes.

2013-09-03 Thread R. David Murray
On Tue, 03 Sep 2013 10:56:36 +0900, "Stephen J. Turnbull" wrote: > R. David Murray writes: > > I can understand the structure Glen found in Applemail: > > a series of text/plain parts interspersed with image/jpg, with all parts > > after the first being marked

Re: [Python-Dev] Completing the email6 API changes.

2013-09-03 Thread R. David Murray
On Tue, 03 Sep 2013 10:01:42 -0400, "R. David Murray" wrote: > On Tue, 03 Sep 2013 10:56:36 +0900, "Stephen J. Turnbull" > wrote: > > R. David Murray writes: > > > I can understand the structure Glen found in Applemail: > > > a series of text

Re: [Python-Dev] windows file closing race condition?

2013-09-06 Thread R. David Murray
On Fri, 06 Sep 2013 13:21:35 +0100, Tim Golden wrote: > On 06/09/2013 12:50, Richard Oudkerk wrote: > > On 06/09/2013 11:23am, Tim Golden wrote: > >> On 06/09/2013 11:14, Antoine Pitrou wrote: > >>> Le Fri, 06 Sep 2013 08:58:06 +0100, > >>> Tim Golden a écrit : > > What should Python d

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

2013-09-06 Thread R. David Murray
On Fri, 06 Sep 2013 10:54:45 +0100, Andrew Miller wrote: > Are there any plans to update this module to the latest Unicode version > (6.2, with 6.3 being released shortly), or is there another module that > provides more up to date information? Python 3.4 currently has 6.2. If 6.3 gets released

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

2013-09-06 Thread R. David Murray
On Fri, 06 Sep 2013 17:33:47 +0200, Stefan Behnel wrote: > Andrew Miller, 06.09.2013 11:54: > > The unicodedata module only contains data up to Unicode 5.2 (October 2009), > > so attempting to reference any character from a later version e.g: > > > > unicodedata.lookup("TURKISH LIRA SIGN") > > >

Re: [Python-Dev] inspect and metaclasses

2013-09-06 Thread R. David Murray
On Fri, 06 Sep 2013 08:14:09 -0700, Ethan Furman wrote: > On 09/06/2013 07:47 AM, Armin Rigo wrote: > > > > Are you suggesting that inspect.getmro(A) would return (A, object, > > type)? That seems very wrong to me. > > Currently, `inspect.getmro(A)` returns `(A, object)`. Which matches A.__mro_

Re: [Python-Dev] when to fix cross-version bugs?

2013-09-06 Thread R. David Murray
On Fri, 06 Sep 2013 07:51:06 -0700, Ethan Furman wrote: > I recently committed a fix for unicodeobject.c so that the %d, %i, and %u > format specifiers always output values > (otherwise, in subclasses, the str() was used instead). > > Should this be fixed in 3.3 as well? > > What guidelines det

Re: [Python-Dev] inspect and metaclasses

2013-09-06 Thread R. David Murray
On Fri, 06 Sep 2013 08:59:02 -0700, Ethan Furman wrote: > On 09/06/2013 08:44 AM, R. David Murray wrote: > > On Fri, 06 Sep 2013 08:14:09 -0700, Ethan Furman wrote: > >> On 09/06/2013 07:47 AM, Armin Rigo wrote: > >>> > >>> Are you suggesting that

Re: [Python-Dev] inspect and metaclasses

2013-09-06 Thread R. David Murray
On Fri, 06 Sep 2013 10:01:32 -0700, Ethan Furman wrote: > On 09/06/2013 09:37 AM, R. David Murray wrote: > > On Fri, 06 Sep 2013 08:59:02 -0700, Ethan Furman wrote: > >> > >> For the short term I can restrict the change to > >> inspect.classify_class_attrs().

Re: [Python-Dev] Offtopic: OpenID Providers

2013-09-06 Thread R. David Murray
On Fri, 06 Sep 2013 14:53:00 -0400, Donald Stufft wrote: > > On Sep 6, 2013, at 1:22 PM, Dan Callahan wrote: > > > On 9/5/13 12:31 PM, Jesus Cea wrote: > >> I have big hopes for Mozilla Persona, looking forward > >> Python infrastructure support :). > > > > Hi, I'm the project lead on Persona

Re: [Python-Dev] Offtopic: OpenID Providers

2013-09-06 Thread R. David Murray
On Fri, 06 Sep 2013 15:17:12 -0400, Donald Stufft wrote: > On Sep 6, 2013, at 3:11 PM, "R. David Murray" wrote: > > > IMO, single signon is overrated. Especially if one prefers not to make > > it easy for various accounts to be automatically associated with one >

Re: [Python-Dev] [python-committers] [RELEASED] Python 3.4.0a2

2013-09-09 Thread R. David Murray
On Mon, 09 Sep 2013 14:45:51 +0200, Antoine Pitrou wrote: > Le Mon, 9 Sep 2013 14:30:50 +0200, > Victor Stinner a écrit : > > 2013/9/9 Larry Hastings : > > > Python 3.4 includes a range of improvements of the 3.x series, > > > including hundreds of small improvements and bug fixes. Major new >

Re: [Python-Dev] Offtopic: paranoia

2013-09-09 Thread R. David Murray
On Mon, 09 Sep 2013 17:11:21 +0200, Jesus Cea wrote: > -BEGIN PGP SIGNED MESSAGE- > Hash: SHA1 > > On 06/09/13 21:34, R. David Murray wrote: > > Note that I said that single signon *itself* was overrated. If you > > use the same token to authenticate to mult

Re: [Python-Dev] Add a "transformdict" to collections

2013-09-10 Thread R. David Murray
On Tue, 10 Sep 2013 16:21:18 +0100, Nigel Small wrote: > Could a more generic variant of this class work? In the same way that > `sorted` can accept a comparison function, similar could be done for a > dictionary-like class: > > d = transformdict(key=str.lower) > > Strictly speaking, this would

Re: [Python-Dev] Add a "transformdict" to collections

2013-09-11 Thread R. David Murray
On Wed, 11 Sep 2013 06:08:25 -0500, Skip Montanaro wrote: > > Seriously, I'm curious: what needs to mature, according to you? > > In my mind, its availability on PyPI along with demonstrated use in > the wild (plus corresponding votes to demonstrate that people use/like > it) would help. That yo

Re: [Python-Dev] PEP 447: add type.__locallookup__

2013-09-12 Thread R. David Murray
On Thu, 12 Sep 2013 16:42:39 +0200, Ronald Oussoren wrote: > > On 9 Sep, 2013, at 20:23, Jan Kaliszewski wrote: > > > Is '__locallookup__' a really good name? In Python, *local* -- > > especially in context of *lookups* -- usually associates with > > locals() i.e. a namespace of a function/met

Re: [Python-Dev] Add a "transformdict" to collections

2013-09-12 Thread R. David Murray
On Thu, 12 Sep 2013 08:05:44 -0700, Ethan Furman wrote: > On 09/12/2013 07:43 AM, Antoine Pitrou wrote: > > > > Yeah, so this is totally silly. What you're basically saying is "we > > don't need TransformDict since people can re-implement it themselves". > > No, what I'm saying is that the "case-

Re: [Python-Dev] PEP 455: TransformDict

2013-09-13 Thread R. David Murray
On Fri, 13 Sep 2013 20:40:58 +0200, Antoine Pitrou wrote: > Rationale > = > > Numerous specialized versions of this pattern exist. The most common > is a case-insensitive case-preserving dict, i.e. a dict-like container > which matches keys in a case-insensitive fashion but retains the >

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

2013-09-16 Thread R. David Murray
On Mon, 16 Sep 2013 15:48:54 -0400, Brett Cannon wrote: > On Mon, Sep 16, 2013 at 3:45 PM, Antoine Pitrou wrote: > > So I would like to propose the following API change: > > > > - Path.stat() (and stat-accessing methods such as get_mtime()...) > > returns an uncached stat object by default > >

Re: [Python-Dev] PEP 453: Explicit bootstrapping of pip

2013-09-17 Thread R. David Murray
This PEP looks great to me. Thanks to everyone involved. On Wed, 18 Sep 2013 00:46:01 +1000, Nick Coghlan wrote: > Reducing the burden of actually installing a third-party package should > also decrease the pressure to add every useful module to the standard > library. This will allow additions

Re: [Python-Dev] PEP 453: Explicit bootstrapping of pip

2013-09-17 Thread R. David Murray
On Tue, 17 Sep 2013 12:38:31 -0400, Donald Stufft wrote: > On Sep 17, 2013, at 12:25 PM, "R. David Murray" wrote: > > I don't think this PEP changes the inclusion calculus, because I don't > > think we've given any real weight to that in stdlib inclu

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

2013-09-17 Thread R. David Murray
On Tue, 17 Sep 2013 15:39:25 -0400, Brett Cannon wrote: > On Tue, Sep 17, 2013 at 2:45 PM, Glenn Linderman wrote: > > On 9/17/2013 10:51 AM, Guido van Rossum wrote: > > > > But only the PSF has the list of original contributors and their licenses. > > > > So can that list be made public, and avai

Re: [Python-Dev] [Python-checkins] cpython (2.6): #14984: only import pwd on POSIX.

2013-09-18 Thread R. David Murray
On Wed, 18 Sep 2013 21:38:48 -0400, Barry Warsaw wrote: > On Sep 18, 2013, at 03:00 PM, r.david.murray wrote: > > >http://hg.python.org/cpython/rev/fb3ad8a749c8 > >changeset: 85749:fb3ad8a749c8 > >branch: 2.6 > >parent: 85735:1b673e0fd8f3 > >

Re: [Python-Dev] Use an empty def as a lambda

2013-09-21 Thread R. David Murray
On Sat, 21 Sep 2013 12:55:20 -0500, Ryan wrote: > "Westley Martínez" wrote: > >'def' is no more ambiguous than 'lambda', and is in fact more > >ambiguous, > >for 'def' doesn't lend itself to anything other than the word define, > >whilst 'lambda' can only mean lambda function. Calling def expli

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

2013-09-21 Thread R. David Murray
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: > >>> class C(): > def __del__(self): raise A

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

2013-09-23 Thread R. David Murray
On Sun, 22 Sep 2013 16:19:21 -0700, Guido van Rossum wrote: > On Sun, Sep 22, 2013 at 2:41 PM, Xavier Morel wrote: > > > The points here are that there's a single source of truth (so we can't > > have conflicting docstring and rst documentation), and documentation > > becoming outdated can be not

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

2013-09-23 Thread R. David Murray
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 suggest changing that er

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

2013-09-27 Thread R. David Murray
On Fri, 27 Sep 2013 15:26:41 +0100, Paul Moore wrote: > On 27 September 2013 15:08, Stephen J. Turnbull wrote: > >> New users on Windows and Mac OS X. I've heard many more complaints > > > from folks running tutorials about the pip bootstrapping process than > > > I ever have from the community

Re: [Python-Dev] Reduce memory footprint of Python

2013-10-08 Thread R. David Murray
On Sun, 06 Oct 2013 22:27:52 +0200, mar...@v.loewis.de wrote: > > Quoting Benjamin Peterson : > > >> If you know that your application uses a lot of memory, it is > >> interesting to sometimes (when the application is idle) try to release > >> some bytes to not use all the system memory. On embed

Re: [Python-Dev] PEP 455: TransformDict

2013-10-08 Thread R. David Murray
On Tue, 08 Oct 2013 22:02:43 +0400, Yuriy Taraday wrote: > There should be a way to avoid creation of the second dict when there is no > need to store original keys. For example, email.message module doesn't > store original headers as they are not needed. The same applies to web > frameworks pars

Re: [Python-Dev] Reduce memory footprint of Python

2013-10-08 Thread R. David Murray
On Tue, 08 Oct 2013 14:43:03 -0400, Benjamin Peterson wrote: > 2013/10/8 R. David Murray : > > PS: I have always thought it sad that the ready availability of memory, > > CPU speed, and disk space tends to result in lazy programs. I understand > > there is an effort/value

Re: [Python-Dev] lzma and 'x' mode open

2013-10-08 Thread R. David Murray
On Tue, 08 Oct 2013 20:49:17 -0400, Tim Heaney wrote: > I love the 'x' mode open in recent versions of Python. I just discovered > that lzma.open doesn't support it. It seems there's an elif that explicitly > checks the modes allowed. I added "x" and "xb" to the choices and now it > seems to work

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

2013-10-09 Thread R. David Murray
On Wed, 09 Oct 2013 17:05:12 +0100, Paul Moore wrote: > On 9 October 2013 16:07, Larry Hastings wrote: > > On 10/09/2013 04:38 PM, Paul Moore wrote: > > > > For that matter, why does the syntax used by Argument Clinic have to > > be the same as whatever future syntax is used in Python? If indeed,

Re: [Python-Dev] Python startup time

2013-10-10 Thread R. David Murray
On Thu, 10 Oct 2013 07:41:19 +0300, yoav glazner wrote: > I'm not sure Droping imports is the best way to go, since every python > script/app will import common modules right on the start and it will still > seem like the interpeter boot is slow. > > making modules load faster seems like a better

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

2013-10-11 Thread R. David Murray
On Fri, 11 Oct 2013 20:32:45 +0300, Serhiy Storchaka wrote: > 11.10.13 10:24, Antoine Pitrou написав(ла): > > Ezio was -1 on the tracker, and Eric Smith was -0. I'd like to add my > > -1 too. This is a useless addition (the traditional idiom is perfectly > > obvious) and makes reading fo

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

2013-10-11 Thread R. David Murray
On Fri, 11 Oct 2013 20:01:07 +0100, MRAB wrote: > On 11/10/2013 19:41, Glenn Linderman wrote: > > On 10/11/2013 10:19 AM, Eric V. Smith wrote: > >> On 10/11/2013 12:43 PM, Barry Warsaw wrote: > >>> On Oct 11, 2013, at 06:27 PM, Georg Brandl wrote: > >>> > Maybe to fit in with other verb-like

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

2013-10-11 Thread R. David Murray
On Fri, 11 Oct 2013 16:09:56 -0300, Zero Piraeus wrote: > : > > On Fri, Oct 11, 2013 at 08:01:07PM +0100, MRAB wrote: > > On 11/10/2013 19:41, Glenn Linderman wrote: > > >Insistence on using "with" for the anti-pattern, and proper English, > > >would require: > > > > > >with ignorance_of(FileNotF

Re: [Python-Dev] tracker/irc and development transparency (was: cpython: Rename contextlib.ignored ...)

2013-10-11 Thread R. David Murray
On Fri, 11 Oct 2013 20:20:28 -0400, Barry Warsaw wrote: > On Oct 12, 2013, at 09:06 AM, Nick Coghlan wrote: > > >I'm not too fussy about the name (clearly). We originally picked ignored(), > >Raymond asked if he could change it to ignore() (and I said yes), > > Just as a point of order, it would

Re: [Python-Dev] Change PEP 399 import recommendation

2013-10-12 Thread R. David Murray
On Sat, 12 Oct 2013 16:04:23 +0200, Stefan Behnel wrote: > Stefan Krah, 12.10.2013 15:41: > > Nick Coghlan wrote: > >> On 12 Oct 2013 05:49, "Eric Snow" wrote: > >>> On Fri, Oct 11, 2013 at 1:41 PM, Stefan Krah wrote: > Antoine Pitrou wrote: > > Just create a _pydecimal module (like _pyio

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

2013-10-13 Thread R. David Murray
+1 to the below. I don't have a strong opinion about the feature itself. The number of times I can imagine using it in code is pretty close to zero, but might not actually turn out to *be* zero, you never know. But the name hurts my brain for the reasons PJ explains :) --David PS: I think you

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

2013-10-13 Thread R. David Murray
On Sun, 13 Oct 2013 13:58:56 -0400, Alexander Belopolsky wrote: > The feature (*and* its name) is a fine solution for the problem that > it solves and is an improvement over status quo. > > I find > > with ignore(OSError): > os.unlink(path) > > much easier to read than > > try: >os.u

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

2013-10-15 Thread R. David Murray
On Tue, 15 Oct 2013 22:57:34 +1000, Nick Coghlan wrote: > On 15 October 2013 22:27, Antoine Pitrou wrote: > > Le Tue, 15 Oct 2013 22:05:41 +1000, > > Nick Coghlan a écrit : > > > >> On 15 October 2013 13:12, Glenn Linderman > >> wrote: > >> > Of course, if the name were changed to be accurate,

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

2013-10-15 Thread R. David Murray
On Tue, 15 Oct 2013 15:02:15 -0300, Zero Piraeus wrote: > : > > On Tue, Oct 15, 2013 at 09:45:59AM -0700, Ethan Furman wrote: > > [...] if the CM provides the value before, and the with block accepts > > it, it can then have the exception added to it: > > > > with trap(OSError) as cm: > >

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

2013-10-15 Thread R. David Murray
On Wed, 16 Oct 2013 09:24:11 +1000, Nick Coghlan wrote: > On 16 Oct 2013 01:54, "R. David Murray" wrote: > > With that change, I'd be +1. With just suppress, I'm -0. > > Please, please, please just let it drop. Even though it eventually > convinced me

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

2013-10-16 Thread R. David Murray
Victor Stinner a écrit : > I might agree with idea of contextlib.ignore() (I'm still opposed to > the idea), but I don't understand the purpose of adding a new syntax > doing exactly the same than try/except: > > > with trap(OSError) as cm: > > os.unlink('missing.txt') > > if cm.

Re: [Python-Dev] Proper way to specify that a method is not defined for a type

2016-06-07 Thread R. David Murray
For those interested in this topic, if you are not already aware of it, see also http://bugs.python.org/issue25958, which among other things has a relevant proposed patch for datamode.rst. On Tue, 07 Jun 2016 10:56:37 -0700, Guido van Rossum wrote: > Setting it to None in the subclass is the inte

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

2016-06-09 Thread R. David Murray
On Thu, 09 Jun 2016 13:12:22 +0100, Cory Benfield wrote: > The Linux kernel can’t change this stuff easily because they mustn’t > break userspace. Python *is* userspace, we can do what we like, and we I don't have specific input on the rest of this discussion, but I disagree strongly with thi

Re: [Python-Dev] Why does base64 return bytes?

2016-06-14 Thread R. David Murray
On Tue, 14 Jun 2016 14:05:19 -0300, "Joao S. O. Bueno" wrote: > On 14 June 2016 at 13:32, Toshio Kuratomi wrote: > > > > On Jun 14, 2016 8:32 AM, "Joao S. O. Bueno" wrote: > >> > >> On 14 June 2016 at 12:19, Steven D'Aprano wrote: > >> > Is there > >> > a good reason for returning bytes? > >>

Re: [Python-Dev] Why does base64 return bytes?

2016-06-16 Thread R. David Murray
On Wed, 15 Jun 2016 11:51:05 +1200, Greg Ewing wrote: > R. David Murray wrote: > > The fundamental purpose of the base64 encoding is to take a series > > of arbitrary bytes and reversibly turn them into another series of > > bytes in which the eighth bit is not significant.

Re: [Python-Dev] Debugging Python scripts with GDB on OSX

2016-07-07 Thread R. David Murray
On Wed, 06 Jul 2016 16:14:34 -, Alexandru Croitor wrote: > I'm interested to find out if debugging Python scripts with GDB is supported > on OSX at all? > > I'm referring to the functionality described on > https://wiki.python.org/moin/DebuggingWithGdb and on > http://fedoraproject.org/wi

<    1   2   3   4   5   6   7   8   9   10   >