Re: [Python-Dev] Ask a question for a script about re.findall Modlue

2010-05-21 Thread Guido van Rossum
You shouldn't be asking questions about using Python on python-dev -- this list is for development of Python. Your problem is easily explained however: the second argument to p.findall() should be an offset, not a flag set. (You are confusing re.findall() and p.findall().) --Guido On Fri, May 21

[Python-Dev] Ask a question for a script about re.findall Modlue

2010-05-21 Thread Lu, Hongchao (UI Health Care)
Hi All, I am working on a script to use re.findall, But the result seems wield. import re p=re.compile("\S+",re.M) pirfile=""" >DL;mm9| >DL;petMar1| >DL;cavPor3| >DL;mm9|: """ for m in p.findall(pirfile,re.M): pri

Re: [Python-Dev] __package__ attribute

2010-05-21 Thread Andrew Svetlov
For me it's the real bug in standard python import machinery. I don't see any backward incompatibilities. There are very hard to write any import-depended code based on decision: was module imported in absolute or relative way. If it's a bug I can create issue in python bugtracker and provide a pa

Re: [Python-Dev] PEP 3148 ready for pronouncement

2010-05-21 Thread Dj Gilcrease
On Fri, May 21, 2010 at 8:26 AM, Brian Quinlan wrote: > Except that now isn't the time for that discussion. This PEP has discussed > on-and-off for several months on both stdlib-sig and python-dev. I think any time till the PEP is accepted is a good time to discuss changes to the API Issues wit

Re: [Python-Dev] Adding a new C API function in 2.6

2010-05-21 Thread Barry Warsaw
On May 21, 2010, at 01:05 AM, Martin v. Löwis wrote: Should we start thinking about releasing 2.6.6 soonish? >>> >>> By tradition, it should come out soon after 2.7 and be the last bugfix >>> (except for security patches). >> >> I guess what I mean is, should we have (at least) one more point

[Python-Dev] __package__ attribute

2010-05-21 Thread Andrew Svetlov
What are expected values for module.__package__? I see two different behaviors: importlib and standard python import. importlib processes __package__ pretty simple and clean: - for toplevel modules __package__ is empty string - for packages it's package name - for modules inside packages it's again

[Python-Dev] Summary of Python tracker Issues

2010-05-21 Thread Python tracker
ACTIVITY SUMMARY (2010-05-14 - 2010-05-21) 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. 2693 open (+46) / 17908 closed (+24) / 20601 total (+70) Open issues with patches: 1098 Ave

[Python-Dev] PEP 3148 ready for pronouncement

2010-05-21 Thread Yannick Loitière
The description of Future.add_done_callback() does not specify whether the callbacks are done in any particular order (such as the order they were added) or not. I'm guessing they are not, but believe it should be documented either way. -- Yannick Loitière __

Re: [Python-Dev] Documenting [C]Python's Internals

2010-05-21 Thread Michael Foord
On 21/05/2010 13:42, Lie Ryan wrote: On 05/21/10 15:18, Yaniv Aknin wrote: I would if I were qualified, but I an mot. One way to get people to help with details is to publish mistakes. This happens all the time on python-list ;-). Pre-review would be nice though. I don't min

Re: [Python-Dev] Documenting [C]Python's Internals

2010-05-21 Thread Lie Ryan
On 05/21/10 15:18, Yaniv Aknin wrote: > I would if I were qualified, but I an mot. One way to get people to help >> with details is to publish mistakes. This happens all the time on >> python-list ;-). Pre-review would be nice though. >> > > I don't mind so much the 'humiliation' of published mist

Re: [Python-Dev] PEP 3148 ready for pronouncement

2010-05-21 Thread Brian Quinlan
On May 21, 2010, at 9:47 PM, John Arbash Meinel wrote: -BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Brian Quinlan wrote: The PEP is here: http://www.python.org/dev/peps/pep-3148/ I think the PEP is ready for pronouncement, and the code is pretty much ready for submission into py3k (I will

Re: [Python-Dev] Reasons behind misleading TypeError message when passing the wrong number of arguments to a method

2010-05-21 Thread Michael Urman
On Thu, May 20, 2010 at 22:54, Steven D'Aprano wrote: > This is misleading, since C().method is a bound method which takes one > argument, x, not two. I find myself wishing that Python distinguished > between ArgumentError and other TypeErrors, so that the method wrapper > of bound methods could s

Re: [Python-Dev] PEP 3148 ready for pronouncement

2010-05-21 Thread John Arbash Meinel
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Brian Quinlan wrote: > The PEP is here: > http://www.python.org/dev/peps/pep-3148/ > > I think the PEP is ready for pronouncement, and the code is pretty much > ready for submission into py3k (I will have to make some minor changes > in the patch like

Re: [Python-Dev] PEP 3148 ready for pronouncement

2010-05-21 Thread Brian Quinlan
On May 21, 2010, at 9:44 PM, John Arbash Meinel wrote: Brian Quinlan wrote: The PEP is here: http://www.python.org/dev/peps/pep-3148/ I think the PEP is ready for pronouncement, and the code is pretty much ready for submission into py3k (I will have to make some minor changes in the patc

Re: [Python-Dev] PEP 3148 ready for pronouncement

2010-05-21 Thread Brian Quinlan
Hey Mark, This really isn't the time to propose changes. The PEP has been discussed extensively on stdlib-sig and python-dev. On May 21, 2010, at 9:29 PM, Mark Summerfield wrote: On 2010-05-21, Brian Quinlan wrote: The PEP is here: http://www.python.org/dev/peps/pep-3148/ [snip] Hi Brian,

Re: [Python-Dev] PEP 3148 ready for pronouncement

2010-05-21 Thread John Arbash Meinel
Brian Quinlan wrote: > The PEP is here: > http://www.python.org/dev/peps/pep-3148/ > > I think the PEP is ready for pronouncement, and the code is pretty much > ready for submission into py3k (I will have to make some minor changes > in the patch like changing the copyright assignment): > http://c

Re: [Python-Dev] PEP 3148 ready for pronouncement

2010-05-21 Thread Mark Summerfield
On 2010-05-21, Brian Quinlan wrote: > The PEP is here: > http://www.python.org/dev/peps/pep-3148/ [snip] Hi Brian, Could I suggest a small subtle changing in naming: replace "executor" with "executer"? I guess this suggestion is doomed though since Java uses executor:-( I'd also be tempted to re