Re: [Python-Dev] lifting of prohibition against readlines inside a "for line in file" in Py3?

2009-02-18 Thread rdmurray
On Wed, 18 Feb 2009 at 21:25, Antoine Pitrou wrote: Nick Coghlan gmail.com> writes: I *think* the 2.x system had an internal buffer that was used by the file iterator, but not by the file methods. With the new IO stack for 3.0, there is now a common buffer shared by all the file operations (in

Re: [Python-Dev] lifting of prohibition against readlines inside a "for line in file" in Py3?

2009-02-19 Thread rdmurray
On Wed, 18 Feb 2009 at 20:31, Guido van Rossum wrote: On Wed, Feb 18, 2009 at 6:38 PM, wrote: On Wed, 18 Feb 2009 at 21:25, Antoine Pitrou wrote: Nick Coghlan gmail.com> writes: I *think* the 2.x system had an internal buffer that was used by the file iterator, but not by the file methods

Re: [Python-Dev] IO implementation: in C and Python?

2009-02-19 Thread rdmurray
On Thu, 19 Feb 2009 at 21:41, Benjamin Peterson wrote: As we prepare to merge the io-c branch, the question has come up [1] about the original Python implementation. Should it just be deleted in favor C version? The wish to maintain the two implementations together has been raised on the basis th

Re: [Python-Dev] A suggestion: Do proto-PEPs in Google Docs

2009-02-20 Thread rdmurray
On Sat, 21 Feb 2009 at 12:56, Stephen J. Turnbull wrote: (4) automatic saves of intermediate work -- at the tweak stage, the effort to save, commit, and push to a DVCS outweighs the effort to tweak, costing a lot of polish IME -- wikis don't do this, and I wonder whether people would

Re: [Python-Dev] A suggestion: Do proto-PEPs in Google Docs

2009-02-21 Thread rdmurray
On Sat, 21 Feb 2009 at 01:12, Jeff Hall wrote: Not that I'm expecting to be working on PEPs any time soon, but just as a different perspective, I would find the effort to open up Google docs to be a much higher barrier to doing some editing tweaks than the dvcs case. For the DVCS, I'd just write

Re: [Python-Dev] Adding PEP consistent aliases for names that don't currently conform

2009-03-03 Thread rdmurray
On Tue, 3 Mar 2009 at 06:01, Ivan Krsti?~G wrote: On Mar 2, 2009, at 7:08 PM, Steve Holden wrote: > > PS.: so is datetime.datetime a builtin then? :) > > Another historic accident. Like socket.socket. :-( > A pity this stuff wasn't addressed for 3.0. Way too late now, though. It may be t

Re: [Python-Dev] PEP 372 -- Adding an ordered directory to collections ready for pronouncement

2009-03-04 Thread rdmurray
On Wed, 4 Mar 2009 at 23:37, Lie Ryan wrote: Steve Holden wrote: Raymond Hettinger wrote: > > > Perhaps the terminology should be > > > > > >ordereddict -- what we have here > > > > > >sorteddict -- hypothetical future type that keeps > > > itself sorted in key orde

Re: [Python-Dev] patch commit policies (was [issue4308] repr of httplib.IncompleteRead is stupid)

2009-03-06 Thread rdmurray
On Fri, 6 Mar 2009 at 20:57, "Martin v. L??wis" wrote: If it is possible for a hostile outsider to trigger the DOS by sending mail to be processed by an application using the library, and the application can't avoid the DOS without ditching / forking / monkeypatching the library, then I would cal

[Python-Dev] Belated introduction

2009-03-07 Thread rdmurray
I've been watching the threads about tracker maintenance and patch review with interest. I'm afraid that I did not follow the list recommendation to introduce myself when I first started posting, partly because I initially jumped in on something that was a bit of a hot button issue for me :) So,

Re: [Python-Dev] Belated introduction

2009-03-07 Thread rdmurray
On Sat, 7 Mar 2009 at 08:42, Aahz wrote: On Sat, Mar 07, 2009, rdmur...@bitdance.com wrote: So, a little belatedly, here is my intro. [...] --RDM Welcome! You apparently haven't set your $NAME nor listed a name in your .sig, so how do you prefer to be addressed? Or do you just prefer your

Re: [Python-Dev] Python-3.0, unicode, and os.environ

2008-12-05 Thread rdmurray
On Fri, 5 Dec 2008 at 12:11, Guido van Rossum wrote: On Fri, Dec 5, 2008 at 12:05 PM, Toshio Kuratomi <[EMAIL PROTECTED]> wrote: Guido van Rossum wrote: On Fri, Dec 5, 2008 at 2:27 AM, Ulrich Eckhardt <[EMAIL PROTECTED]> wrote: In 99% of all cases, using the default encoding will work and do w

Re: [Python-Dev] Python-3.0, unicode, and os.environ

2008-12-05 Thread rdmurray
On Sat, 6 Dec 2008 at 13:06, Steven D'Aprano wrote: Applications can deal with such weird file names. KDE's file manager (konqueror) and file selection dialog both show the character as a small square, presumably the font's missing character glyph, and KDE apps can open and save the file. Still s

Re: [Python-Dev] Python-3.0, unicode, and os.environ

2008-12-08 Thread rdmurray
On Sun, 7 Dec 2008 at 13:33, Guido van Rossum wrote: My problem with raising exceptions *by default* when an undecodable name exists is that it may render an app completely useless in a situation where the developer is no longer around. This happened all I think Nick Coghlan's suggestion of emi

Re: [Python-Dev] Python-3.0, unicode, and os.environ

2008-12-08 Thread rdmurray
On Mon, 8 Dec 2008 at 13:16, Terry Reedy wrote: And the decoding problems don't pass silently either - they just get emitted as a warning by default instead of causing the application to crash. Do they get automatically logged? In any case, the errors parameter has an in between option to

Re: [Python-Dev] Python-3.0, unicode, and os.environ

2008-12-08 Thread rdmurray
On Mon, 8 Dec 2008 at 11:25, Guido van Rossum wrote: On Mon, Dec 8, 2008 at 10:34 AM, <[EMAIL PROTECTED]> wrote: I'm in favor of an option to control what happens. I just really really don't want the _default_ to be "ignore". Defaulting to a warning is fine with me, as would be defaulting to

Re: [Python-Dev] RELEASED Python 3.0 final

2008-12-09 Thread rdmurray
On Sat, 6 Dec 2008 at 20:19, [EMAIL PROTECTED] wrote: On 05:54 pm, [EMAIL PROTECTED] wrote: On Fri, Dec 5, 2008 at 9:28 PM, <[EMAIL PROTECTED]> wrote: Whenever someone asks me which version to use, I alwasys respond with a question -- what do you want to use it for? In the longer term, I thin

Re: [Python-Dev] A wart which should have been repaired in 3.0?

2008-12-30 Thread rdmurray
On Tue, 30 Dec 2008 at 17:51, Phillip J. Eby wrote: At 02:32 PM 12/30/2008 -0800, Scott David Daniels wrote: More trouble with the "just take the dirname": paths = ['/a/b/c', '/a/b/d', '/a/b'] os.path.dirname(os.path.commonprefix([ os.path.normpath(p) for p in

Re: [Python-Dev] A wart which should have been repaired in 3.0?

2008-12-30 Thread rdmurray
On Tue, 30 Dec 2008 at 21:30, rdmur...@bitdance.com wrote: On Tue, 30 Dec 2008 at 17:51, Phillip J. Eby wrote: At 02:32 PM 12/30/2008 -0800, Scott David Daniels wrote: > More trouble with the "just take the dirname": > > paths = ['/a/b/c', '/a/b/d', '/a/b'] > os.path.dirname(os.p

Re: [Python-Dev] py3k: TypeError: object.__init__() takes no parameters

2009-01-16 Thread rdmurray
On Fri, 16 Jan 2009 at 16:53, Nick Craig-Wood wrote: [snip] Perhaps 2.5's object.__init__ just swallowed all args, thus hiding bogus calls. Yes it did which is the fundamental difference in behaviour between py2 and py3 as far as I can see. Actually, between py<=2.5 and py>=2.6. --RDM ___

Re: [Python-Dev] PEP 3142: Add a "while" clause to generator expressions

2009-01-20 Thread rdmurray
On Tue, 20 Jan 2009 at 16:56, Antoine Pitrou wrote: Alexey G. Shpagin udmvt.ru> writes: Example will look like g = (n for n in range(100) if n*n < 50 or else_break()) Please don't suggest any hack involving raising StopIteration as part of a conditional statement in a generator expression.

Re: [Python-Dev] PEP 3142: Add a "while" clause to generator expressions

2009-01-21 Thread rdmurray
On Wed, 21 Jan 2009 at 21:46, Steven D'Aprano wrote: On Wed, 21 Jan 2009 03:10:24 pm Terry Reedy wrote: It is a carefully designed 1 to 1 transformation between multiple nested statements and a single expression. I'm sure that correspondence is obvious to some, but it wasn't obvious to me, and

Re: [Python-Dev] __del__ and tp_dealloc in the IO lib

2009-01-23 Thread rdmurray
On Fri, 23 Jan 2009 at 11:57, Giovanni Bajo wrote: The fact that file objects are collected and closed immediately in all reasonable use cases (and even in case of exceptions, that you mention, things get even better with the new semantic of the except clause) is a *good* property of Python. I re

Re: [Python-Dev] Should ftplib use UTF-8 instead of latin-1 encoding?

2009-01-23 Thread rdmurray
On Fri, 23 Jan 2009 at 21:55, Oleg Broytmann wrote: On Fri, Jan 23, 2009 at 10:15:18AM -0800, Brett Cannon wrote: If I remember correctly something along Martin's comment about 7-bit clean is needed, but some servers don't follow the standard, so I swapped it to Latin-1. But that was so long ago

Re: [Python-Dev] Should ftplib use UTF-8 instead of latin-1 encoding?

2009-01-23 Thread rdmurray
On Fri, 23 Jan 2009 at 21:23, "Martin v. L?wis" wrote: Given that a Unix OS can't know what encoding a filename is in (*), I can't see that one could practically implement a Unix FTP server in any other way. However, an ftp server is different. It might start up with an empty folder, and receiv

Re: [Python-Dev] Examples in Py2 or Py3

2009-01-29 Thread rdmurray
On Thu, 29 Jan 2009 at 10:50, Facundo Batista wrote: This introduces the problem that some examples are in Py2 and others are in Py3. Sometimes this is not explicit, and gets confusing. I'm trying to avoid this confusion when preparing my own examples. So far, I use (py3) as a prefix for any exam

Re: [Python-Dev] Python 3.0.1

2009-01-29 Thread rdmurray
On Thu, 29 Jan 2009 at 16:43, Raymond Hettinger wrote: On Thu, 29 Jan 2009 at 15:40, Guido van Rossum wrote: Also you could try find shelve users (are there any?) I'm a big fan of shelves and have always used them extensively. Not sure if anyone else cares about them though. I use them.