Re: [Python-Dev] standard library mimetypes module pathologically broken?

2009-08-14 Thread Jacob Rus
11 Aug 2009, Benjamin Peterson wrote: > 2009/8/11 Jacob Rus: >> I have some other questions: How does one deprecate part of a standard >> library API? How can we alert users to the deprecation? When can the >> deprecated parts be removed? > > Basically, you add a DeprecationWarning to the API. Then

Re: [Python-Dev] request for comments - standardization of python's purelib and platlib

2009-08-14 Thread David Lyon
Hi Tarek, What is needed is to remove/refactor the hardcoding of paths that currently exists within distutils and replace it with the ability to override the defaults via configuration files. (distutils.cfg?) If there's one thing that's certain for the future, its that python will go onto more

Re: [Python-Dev] (try-except) conditional expression similar to (if-else) conditional (PEP 308)

2009-08-14 Thread Alexander Kozlovsky
Jeff McAninch wrote: > I very often want something like a try-except conditional expression similar > to the if-else conditional. I think it may be done currently with the help of next function: def guard(func, *args): try: return func() except Exception, e:

Re: [Python-Dev] Tweaking AST lineno and col_offset

2009-08-14 Thread Frank Wierzbicki
On Fri, Aug 14, 2009 at 5:57 PM, Brett Cannon wrote: > I like the improvement, but I disagree it should be considered for > backporting as it changes semantics for something that could be considered a > bug, but that feels like a stretch. Just thought I'd ask -- I'm perfectly ok with the change bei

Re: [Python-Dev] Tweaking AST lineno and col_offset

2009-08-14 Thread Brett Cannon
On Fri, Aug 14, 2009 at 09:16, Benjamin Peterson wrote: > 2009/8/14 Frank Wierzbicki : > > Hi all, > > > > Off and on I have been directly comparing Jython's AST with Python's > > AST and generally working towards making them as close to identical as > > possible. There are a couple of places whe

Re: [Python-Dev] functools.compose to chain functions together

2009-08-14 Thread Brett Cannon
It would be best to discuss this on comp.lang.python or python-ideas to get general support for the idea before trying to bring this to python-dev in hopes of changing people's minds. On Fri, Aug 14, 2009 at 11:39, Jason R. Coombs wrote: > I’d like to express additional interest in python patch

Re: [Python-Dev] Tweaking AST lineno and col_offset

2009-08-14 Thread Frank Wierzbicki
On Fri, Aug 14, 2009 at 3:41 PM, Frank Wierzbicki wrote: >> It's at the bottom of the test file. :) You can add a handwritten test >> above that, though. > Heh -- how did I miss that :) ? -- I'll resubmit the patch with tests. Resubmitted http://bugs.python.org/issue6704 with tests. -Frank ___

Re: [Python-Dev] Tweaking AST lineno and col_offset

2009-08-14 Thread Frank Wierzbicki
On Fri, Aug 14, 2009 at 3:11 PM, Benjamin Peterson wrote: > 2009/8/14 Frank Wierzbicki : >> On Fri, Aug 14, 2009 at 12:16 PM, Benjamin Peterson >> wrote: >> I have a local patch that changes the CPython col_offset to match Jython's, but before I submit a patch I thought I'd ask here if t

Re: [Python-Dev] Tweaking AST lineno and col_offset

2009-08-14 Thread Benjamin Peterson
2009/8/14 Frank Wierzbicki : > On Fri, Aug 14, 2009 at 12:16 PM, Benjamin Peterson > wrote: > >>> I have a local patch that changes the CPython col_offset to match >>> Jython's, but before I submit a patch I thought I'd ask here if there >>> is support for this sort of change and if I should conti

Re: [Python-Dev] functools.compose to chain functions together

2009-08-14 Thread Xavier Morel
On 14 Aug 2009, at 20:39 , Jason R. Coombs wrote: I've heard it said that Python is not a functional language, but if that were really the case, then functools would not exist. In addition to the example described above, I've had multiple occasions where having a general purpose function co

Re: [Python-Dev] Tweaking AST lineno and col_offset

2009-08-14 Thread Frank Wierzbicki
On Fri, Aug 14, 2009 at 12:16 PM, Benjamin Peterson wrote: >> I have a local patch that changes the CPython col_offset to match >> Jython's, but before I submit a patch I thought I'd ask here if there >> is support for this sort of change and if I should continue to find >> col_offset and lineno r

[Python-Dev] functools.compose to chain functions together

2009-08-14 Thread Jason R. Coombs
I'd like to express additional interest in python patch 1660179, discussed here: http://mail.python.org/pipermail/patches/2007-February/021687.html On several occasions, I've had the desire for something like this. I've made due with lambda functions, but as was mentioned, the lambda is cl

Re: [Python-Dev] expy: an expressway to extend Python

2009-08-14 Thread Yingjie Lan
--- On Sat, 8/8/09, Stefan Behnel wrote: > From: Stefan Behnel > Subject: Re: [Python-Dev] expy: an expressway to extend Python > To: python-dev@python.org > Date: Saturday, August 8, 2009, 4:55 PM > > More details at http://expy.sourceforge.net/ > > I'm clearly biased, but my main concern here

Re: [Python-Dev] Tweaking AST lineno and col_offset

2009-08-14 Thread Benjamin Peterson
2009/8/14 Frank Wierzbicki : > Hi all, > > Off and on I have been directly comparing Jython's AST with Python's > AST and generally working towards making them as close to identical as > possible.  There are a couple of places where I haven't "fixed" Jython > because it looks to me like Jython has

Re: [Python-Dev] request for comments - standardization of python's purelib and platlib

2009-08-14 Thread Jan Matejek
Dne 13.8.2009 21:22, Brett Cannon napsal(a): > On Thu, Aug 13, 2009 at 11:23, Jan Matejek wrote: >> 1 - the traditional way >> purelib = /usr/lib/pythonX.Y/site-packages >> platlib = /usr/lib(64)/pythonX.Y/site-packages >> > > Why can't pure libraries go into lib64 as well? There is nothing sayin

[Python-Dev] Summary of Python tracker Issues

2009-08-14 Thread Python tracker
ACTIVITY SUMMARY (08/07/09 - 08/14/09) Python tracker at http://bugs.python.org/ To view or respond to any of the issues listed below, click on the issue number. Do NOT respond to this message. 2329 open (+26) / 16195 closed ( +8) / 18524 total (+34) Open issues with patches: 925 Average

[Python-Dev] Tweaking AST lineno and col_offset

2009-08-14 Thread Frank Wierzbicki
Hi all, Off and on I have been directly comparing Jython's AST with Python's AST and generally working towards making them as close to identical as possible. There are a couple of places where I haven't "fixed" Jython because it looks to me like Jython has slightly better offsets. One example:

Re: [Python-Dev] Tkinter: modify xview of entry widget

2009-08-14 Thread Guilherme Polo
2009/8/14 paolo.fr...@libero.it : > Hi, > I'm Paolo from Italy and I'm a python user. > I wish to propose a useful and smart method modify in Tkinter Library: > > Previously to scroll this widget we had to write an external function   > (recalling xview_moveto and xview_scroll). > > With my method

Re: [Python-Dev] Tkinter: modify xview of entry widget

2009-08-14 Thread Michael Foord
paolo.fr...@libero.it wrote: Hi, I'm Paolo from Italy and I'm a python user. I wish to propose a useful and smart method modify in Tkinter Library: Hi Paolo, Can you create an issue on the bug tracker - with the patch attached. Your suggestion stands a much better chance if this patch incl

[Python-Dev] Tkinter: modify xview of entry widget

2009-08-14 Thread paolo.fr...@libero.it
Hi, I'm Paolo from Italy and I'm a python user. I wish to propose a useful and smart method modify in Tkinter Library: Previously to scroll this widget we had to write an external function (recalling xview_moveto and xview_scroll). With my method this operation is cleared and the same as all ot

Re: [Python-Dev] request for comments - standardization of python's purelib and platlib

2009-08-14 Thread Tarek Ziadé
On Thu, Aug 13, 2009 at 9:22 PM, Brett Cannon wrote: > > > On Thu, Aug 13, 2009 at 11:23, Jan Matejek wrote: >> >> Hello, >> >> I'm cross-posting this to distributi...@freedesktop and python-dev, >> because the topic is relevant to both groups and should be solved in >> cooperation. >> >> The issu

Re: [Python-Dev] standard library mimetypes module pathologically broken?

2009-08-14 Thread Nick Coghlan
Georg Brandl wrote: > Nick Coghlan schrieb: >> P.S. For anyone else that is slow like me, take a close look at PEP 387... > > What should we see, other than that we have two PEPs on the same topic that > should be merged? Benjamin wrote the second one, so he obviously knows there's a written depr