Re: [Python-Dev] Inconsistent script/console behaviour

2011-12-15 Thread anatoly techtonik
On Sat, Sep 24, 2011 at 11:27 AM, Georg Brandl g.bra...@gmx.net wrote: Am 24.09.2011 01:32, schrieb Guido van Rossum: On Fri, Sep 23, 2011 at 4:25 PM, anatoly techtonik techto...@gmail.com wrote: Currently if you work in console and define a function and then immediately call it - it will

Re: [Python-Dev] Inconsistent script/console behaviour

2011-12-15 Thread Giampaolo Rodolà
Il 15 dicembre 2011 09:58, anatoly techtonik techto...@gmail.com ha scritto: 1. It is not a proposal, but a defect (well, you may argue, but please, don't) You can't copy/paste multiline scripts into system shell either, unless you append \. It's likely that similar problems exists in a lot of

Re: [Python-Dev] Compiling the source without stat

2011-12-15 Thread Hrvoje Niksic
On 12/14/2011 05:04 PM, Hossein wrote: If there is anything I should do You can determine what the code that calls stat() is trying to do, and implement that with other primitives that your platform provides. For example, you can determine whether a file exists by trying to open it in

[Python-Dev] Proposed changes to provide compression support for rotated log files

2011-12-15 Thread Vinay Sajip
In response to http://bugs.python.org/issue13516 I'm thinking of implementing some changes in the rotating file handlers, as outlined here: http://plumberjack.blogspot.com/2011/12/improved-flexibility-for-log-file.html The changes (including tests) are almost ready to check in, but I thought I'd

Re: [Python-Dev] Compiling the source without stat

2011-12-15 Thread Hossein
I wanted to say something in the bug page petri showed ( http://bugs.python.org/issue12082 ) however I though about first discussing it here. If faking a stat struct and a function to fill it solves the problem, and checking for existing files and folders is the only thing that python needs to

Re: [Python-Dev] Compiling the source without stat

2011-12-15 Thread Hossein Azadmanesh
It does have its own file handling functions: Opening, getting the size, enumerating directories, etc. It has its own limitations too. No dates supported, folders only one level deep, maximum 99 files inside each folder, etc. There is not a function called stat. But I am considering faking it,

Re: [Python-Dev] Proposed changes to provide compression support for rotated log files

2011-12-15 Thread Antoine Pitrou
On Thu, 15 Dec 2011 10:31:08 + (UTC) Vinay Sajip vinay_sa...@yahoo.co.uk wrote: In response to http://bugs.python.org/issue13516 I'm thinking of implementing some changes in the rotating file handlers, as outlined here:

Re: [Python-Dev] Compiling the source without stat

2011-12-15 Thread Victor Stinner
Le jeudi 15 décembre 2011 15:29:23 vous avez écrit : If faking a stat struct and a function to fill it solves the problem, and checking for existing files and folders is the only thing that python needs to be compiled (i'm talking about 2.7) then it's possible to fail-check it by just trying

Re: [Python-Dev] Proposed changes to provide compression support for rotated log files

2011-12-15 Thread Terry Reedy
On 12/15/2011 5:31 AM, Vinay Sajip wrote: In response to http://bugs.python.org/issue13516 I'm thinking of implementing some changes in the rotating file handlers, as outlined here: http://plumberjack.blogspot.com/2011/12/improved-flexibility-for-log-file.html The changes (including tests) are

Re: [Python-Dev] Proposed changes to provide compression support for rotated log files

2011-12-15 Thread Vinay Sajip
Antoine Pitrou solipsis at pitrou.net writes: def filename(self, name) sounds like a poor method name. You're right - perhaps def rotation_filename(self, default_name) is better. Regards, Vinay Sajip ___ Python-Dev mailing list

Re: [Python-Dev] Proposed changes to provide compression support for rotated log files

2011-12-15 Thread Vinay Sajip
Terry Reedy tjreedy at udel.edu writes: It appears you are adding two methods to do the same thing. One is to subclass and override one or two functions. The other is to define one or two custom functions and attach as attributes. Both seem equally easy. (Actually, subclassing takes one

Re: [Python-Dev] Inconsistent script/console behaviour

2011-12-15 Thread Terry Reedy
On 12/15/2011 3:58 AM, anatoly techtonik wrote: 1. It is not a proposal, but a defect (well, you may argue, but please, don't) You state a controversial opinion as a fact and then request that others not discuss it. To me, this is a somewhat obnoxious hit-and-run tactic. If you do not want

[Python-Dev] French sprint this week-end

2011-12-15 Thread Victor Stinner
Hi, I organize an online sprint on CPython this week-end with french developers. At least six developers will participe, some of them don't know C, most know Python. Do you know simple task to start contributing to Python? Something useful and not boring if possible :-) There is the easy

Re: [Python-Dev] [Python-checkins] cpython: input() in this sense is gone

2011-12-15 Thread Nadeem Vawda
On Thu, Dec 15, 2011 at 10:44 PM, benjamin.peterson python-check...@python.org wrote: +#       eval_input is the input for the eval() functions. Shouldn't this be function rather than functions? ___ Python-Dev mailing list Python-Dev@python.org

[Python-Dev] A new dict for Xmas?

2011-12-15 Thread Mark Shannon
Hi all, The current dict implementation is getting pretty old, isn't it time we had a new one (for xmas)? I have a new dict implementation which allows sharing of keys between objects of the same class. You can check it out here: http://bitbucket.org/markshannon/hotpy_new_dict Performance:

Re: [Python-Dev] A new dict for Xmas?

2011-12-15 Thread Antoine Pitrou
On Thu, 15 Dec 2011 22:18:18 + Mark Shannon m...@hotpy.org wrote: For the gcbench benchmark (from unladen swallow), cpython with the new dict is about 9% faster and, more importantly, reduces memory use from 99 Mbytes to 61Mbytes (a 38% reduction). All tests were done on my ancient 32

Re: [Python-Dev] Compiling the source without stat

2011-12-15 Thread Martin v. Löwis
Am 15.12.2011 12:59, schrieb Hossein: I wanted to say something in the bug page petri showed ( http://bugs.python.org/issue12082 ) however I though about first discussing it here. If faking a stat struct and a function to fill it solves the problem, and checking for existing files and folders

Re: [Python-Dev] [Python-checkins] cpython: improve abstract property support (closes #11610)

2011-12-15 Thread Nick Coghlan
On Fri, Dec 16, 2011 at 6:34 AM, benjamin.peterson python-check...@python.org wrote: +abc +--- + +Improved support for abstract base classes containing descriptors composed with +abstract methods. The recommended approach to declaring abstract descriptors is +now to provide

Re: [Python-Dev] A new dict for Xmas?

2011-12-15 Thread Mark Shannon
Antoine Pitrou wrote: On Thu, 15 Dec 2011 22:18:18 + Mark Shannon m...@hotpy.org wrote: For the gcbench benchmark (from unladen swallow), cpython with the new dict is about 9% faster and, more importantly, reduces memory use from 99 Mbytes to 61Mbytes (a 38% reduction). All tests were done

[Python-Dev] generators and ceval

2011-12-15 Thread Ron Adam
Hi, I Just added issue 13607 with a patch that removes the generator specific checks and code out of the ceval PyEval_EvalFrameEx() function. Those parts where moved up into the generator gen_send_ex() function. Doing that removed the generator flag checks from the eval loop and made it a bit

Re: [Python-Dev] A new dict for Xmas?

2011-12-15 Thread Greg Ewing
Mark Shannon wrote: I have a new dict implementation which allows sharing of keys between objects of the same class. We already have the __slots__ mechanism for memory savings. Have you done any comparisons with that? Seems to me that __slots__ ought to save even more memory, since it

Re: [Python-Dev] Fixing the XML batteries

2011-12-15 Thread Stefan Behnel
Stefan Behnel, 09.12.2011 09:02: I think Py3.3 would be a good milestone for cleaning up the stdlib support for XML. [...] I still think it is, so let me sum up the current discussion here. What should change? a) The stdlib documentation should help users to choose the right tool right