Re: [Python-Dev] [Python-checkins] cpython (merge 3.3 -> default): Fix typo

2013-04-05 Thread Eli Bendersky
On Fri, Apr 5, 2013 at 1:40 AM, andrew.svetlov wrote: > http://hg.python.org/cpython/rev/6cf485ffd325 > changeset: 83110:6cf485ffd325 > parent: 83106:94fb906e5899 > parent: 83109:9610ede72ed2 > user:Andrew Svetlov > date:Fri Apr 05 11:40:01 2013 +0300 > summary: > Fi

Re: [Python-Dev] Is file.readlines(sizehint=N) broken on 2.7?

2013-04-05 Thread Giampaolo Rodolà
2013/4/5 R. David Murray : > On Fri, 05 Apr 2013 20:24:43 +0200, =?ISO-8859-1?Q?Giampaolo_Rodol=E0?= > wrote: >> 2013/4/5 INADA Naoki : >> > The builtin open() was replaced with io.open(). >> > It's difference between file.readlines() and io.IOBase.readlines(). >> >> Should that justify this diff

Re: [Python-Dev] Is file.readlines(sizehint=N) broken on 2.7?

2013-04-05 Thread R. David Murray
On Fri, 05 Apr 2013 20:24:43 +0200, =?ISO-8859-1?Q?Giampaolo_Rodol=E0?= wrote: > 2013/4/5 INADA Naoki : > > The builtin open() was replaced with io.open(). > > It's difference between file.readlines() and io.IOBase.readlines(). > > Should that justify this difference in behavior? Yes. The 'fil

Re: [Python-Dev] Is file.readlines(sizehint=N) broken on 2.7?

2013-04-05 Thread Guido van Rossum
It's a *hint*, remember? :-) It does work, it's just rounded up to a fairly large number in some implementations. On Fri, Apr 5, 2013 at 11:24 AM, Giampaolo Rodolà wrote: > 2013/4/5 INADA Naoki : >> The builtin open() was replaced with io.open(). >> It's difference between file.readlines() and io

Re: [Python-Dev] Is file.readlines(sizehint=N) broken on 2.7?

2013-04-05 Thread Giampaolo Rodolà
2013/4/5 INADA Naoki : > The builtin open() was replaced with io.open(). > It's difference between file.readlines() and io.IOBase.readlines(). Should that justify this difference in behavior? Apparently on 2.X sizehint does not have any effect as far as I can see. --- Giampaolo https://code.googl

Re: [Python-Dev] Is file.readlines(sizehint=N) broken on 2.7?

2013-04-05 Thread INADA Naoki
The builtin open() was replaced with io.open(). It's difference between file.readlines() and io.IOBase.readlines(). On Sat, Apr 6, 2013 at 2:15 AM, Giampaolo Rodolà wrote: > with open('test-xxx', 'w') as f: > f.write('aaa\nbbb\nccc') > with open('test-xxx', 'r') as f: > print(f.readline

[Python-Dev] Is file.readlines(sizehint=N) broken on 2.7?

2013-04-05 Thread Giampaolo Rodolà
with open('test-xxx', 'w') as f: f.write('aaa\nbbb\nccc') with open('test-xxx', 'r') as f: print(f.readlines(1)) On Python 3.3 I get: ['aaa\n'] ...while on Python 2.7: ['aaa\n', 'bbb\n', 'ccc'] Is this a bug or I'm missing something? --- Giampaolo https://code.google.com/p/pyftpdlib

[Python-Dev] Summary of Python tracker Issues

2013-04-05 Thread Python tracker
ACTIVITY SUMMARY (2013-03-29 - 2013-04-05) Python tracker at http://bugs.python.org/ To view or respond to any of the issues listed below, click on the issue. Do NOT respond to this message. Issues counts and deltas: open3905 (+20) closed 25508 (+47) total 29413 (+67) Open issues wit

Re: [Python-Dev] Slides from today's parallel/async Python talk

2013-04-05 Thread Trent Nelson
On Thu, Apr 04, 2013 at 11:53:01PM -0700, Charles-Fran?ois Natali wrote: > Hello, > > >> async.submit_work(func, args, kwds, callback=None, errback=None) > >> > >> How do you implement arguments passing and return value? > >> > >> e.g. let's say I pass a list as argument: how do you iterate on the

Re: [Python-Dev] relative import circular problem

2013-04-05 Thread Kristján Valur Jónsson
And I should learn to read the entire thread before I start responding. Cheers! K > -Original Message- > From: Python-Dev [mailto:python-dev- > bounces+kristjan=ccpgames@python.org] On Behalf Of Guido van > Rossum > Sent: 4. apríl 2013 22:47 > To: Brett Cannon > Cc: PJ Eby; Nick Coghla

Re: [Python-Dev] relative import circular problem

2013-04-05 Thread Kristján Valur Jónsson
> -Original Message- > From: PJ Eby [mailto:p...@telecommunity.com] > Sent: 4. apríl 2013 20:29 > To: Guido van Rossum > Cc: Kristján Valur Jónsson; Nick Coghlan; python-dev@python.org > Subject: Re: [Python-Dev] relative import circular problem > > So, this is actually an implementation

Re: [Python-Dev] relative import circular problem

2013-04-05 Thread Kristján Valur Jónsson
+1. I was thinking along the same lines. Allowing relative imports in "import module [as X]" statements. If 'module' consists of pure dots, then "as X" is required. Otherwise, if "as X" is not present, strip the leading dot(s) when assigning the local name. K > -Original Message- > From: