Ian Kelly wrote:
On Wed, Jul 6, 2011 at 12:49 AM, Ulrich Eckhardt
ulrich.eckha...@dominolaser.com wrote:
Mel wrote:
In wx, many of the window classes have Create methods, for filling in
various attributes in two-step construction. [...]
Just guessing, is it legacy, C-with-classes code
Chris Angelico wrote:
frameset rows=50%,50%
frameset cols=50%,50%
frame src=http://blah/blah;
frame src=http://another/blah;
/frameset
frameset cols=50%,50%
frame src=http://third/blah;
frame src=http://final/blah;
/frameset
/frameset
That should divide your
Hi Folks,
Here is something I don't fully understand.
1 def DefaultTracer(fmt, *args):
2 fmt = 'in DefaultTracer ' + fmt
3 print(fmt % args)
4 pass
5 def myTracer(fmt, *args):
6 fmt = 'in myTracer ' + fmt
7 print(fmt % args)
8
9 class MyClass:
10 ClassDefaultTracer
I can understand why it's frustrating but a menu items with icons on them
aren't exactly common, so you're wandering into territory that's probably not
so throughly explored (nor standard across platforms). Now that I think about
it, I don't know that I've ever seen one under OSX, and I
Hello,
I've been programming in Python for a few years now. I have read most the
typical learning resources, such as 'Dive Into Python', 'A Byte of Python',
etc. In general I feel I have a good overview of the language. However, as I
advanced toward trying to create more OO styled programs, I
Kannan Varadhan wrote:
Here is something I don't fully understand.
1 def DefaultTracer(fmt, *args):
2 fmt = 'in DefaultTracer ' + fmt
3 print(fmt % args)
4 pass
5 def myTracer(fmt, *args):
6 fmt = 'in myTracer ' + fmt
7 print(fmt % args)
8
9 class MyClass:
Billy Mays wrote:
On 07/06/2011 04:02 PM, Ian Kelly wrote:
According to Wikipedia:
In practice the Schönhage–Strassen algorithm starts to outperform
older methods such as Karatsuba and Toom–Cook multiplication for
numbers beyond 2**2**15 to 2**2**17 (10,000 to 40,000 decimal digits).
I
Hi All ,
Could any one help to get max and min values from a specified column of a
csv file. The* csv file is large* and hence the below code did go bad.
*Alternate
methods would be highly appreciated
**
minimum.py*:
import csv
filename = testLog_4.csv
f = open(filename)
def col_min(mincname):
On 2011-04-20, Bill Marcum wrote:
On 2011-04-20, Adam Funk a24...@ducksburg.com wrote:
I'd appreciate any suggestions for testing (preferably from a bash
script, although perl or python would be OK too) whether anyone is
currently logged in, and whether anyone has been logged in during the
I think you would benefit from reading the data into a numpy array first,
then using numpy min, max functions.
prakash jp wrote:
Hi All ,
Could any one help to get max and min values from a specified column of a
csv file. The* csv file is large* and hence the below code did go bad.
John [H2O] wrote:
[ ... ]
What are the key points to the classes? Is it okay to reference or pass
classes to instantiate a class?
Yes. The standard library does this in BaseHTTPServer (via its parent
SocketServer.) Maybe looks abstruse at the outset, but it's the natural way
to assign a
Mel mwil...@the-wire.com writes:
def file_to_hash(path, m = hashlib.md5()):
hashlib.md5 *is* called once; that is when the def statement is executed.
Very interesting, I certainly wasn't clear on this. So after that def,
the created hashlib object is in the module's scope and can be
accessed
hi all,
I feel lack of native Python lists operations (e.g. taking N greatest
elements with the involved key function and O(n) speed) and
occasionally found blist
http://pypi.python.org/pypi/blist/
Its entry says it is better than Python list. Did anyone ensure?
Will it ever be merged into Python
Anssi Saari a...@sci.fi writes:
Mel mwil...@the-wire.com writes:
def file_to_hash(path, m = hashlib.md5()):
hashlib.md5 *is* called once; that is when the def statement is executed.
Very interesting, I certainly wasn't clear on this. So after that def,
the created hashlib object is in the
prakash jp wrote:
Could any one help to get max and min values from a specified column of a
csv file. The* csv file is large* and hence the below code did go bad.
*Alternate
methods would be highly appreciated
**
minimum.py*:
import csv
filename = testLog_4.csv
f = open(filename)
def
Kannan Varadhan wrote:
Hi Folks,
Here is something I don't fully understand.
1 def DefaultTracer(fmt, *args):
2 fmt = 'in DefaultTracer ' + fmt
3 print(fmt % args)
4 pass
5 def myTracer(fmt, *args):
6 fmt = 'in myTracer ' + fmt
7 print(fmt % args)
Please
Steven D'Aprano steve+comp.lang.pyt...@pearwood.info writes:
Please don't post code with line numbers. That makes it difficult to copy
and paste your function into an interactive session, so that we can run it
and see what it does.
C-x r d
--
On 2011.07.06 06:16 PM, Steven D'Aprano wrote:
Phlip wrote:
Note the fix also avoids comparing to None, which, as usual, is also
icky and less typesafe!
Typesafe? Are you trying to make a joke?
Maybe he has a duck phobia. Maybe he denies the existence of ducks.
Maybe he doesn't like the
Peter Otten wrote:
or you wrap the callable in a descriptor:
def DefaultTracer(*args): print args
...
class D(object):
... def __init__(self, f):
... self.f = f
... def __get__(self, *args):
... return self.f
...
After skimming over Steven's post: use
On 2011.07.06 06:16 PM, Steven D'Aprano wrote: Phlip wrote:
Note the fix also avoids comparing to None, which, as usual, is also
icky and less typesafe!
Typesafe? Are you trying to make a joke?
No, I was pointing out that passing a type is more ... typesafe.
--
On 2011.07.07 08:11 AM, Phlip wrote:
No, I was pointing out that passing a type is more ... typesafe.
None is a type.
None.__class__
class 'NoneType'
--
http://mail.python.org/mailman/listinfo/python-list
On Jul 7, 6:24 am, Andrew Berg bahamutzero8...@gmail.com wrote:
On 2011.07.07 08:11 AM, Phlip wrote: No, I was pointing out that passing a
type is more ... typesafe.
None is a type.
I never said it wasn't.
--
http://mail.python.org/mailman/listinfo/python-list
On 2011.07.07 08:39 AM, Phlip wrote:
On Jul 7, 6:24 am, Andrew Berg bahamutzero8...@gmail.com wrote:
On 2011.07.07 08:11 AM, Phlip wrote: No, I was pointing out that passing a
type is more ... typesafe.
None is a type.
I never said it wasn't.
You are talking about this code, right?
On 2011-07-06, Waldek M. wm@localhost.localdomain wrote:
Dnia Wed, 06 Jul 2011 03:36:24 +1000, Steven D'Aprano napisa?(a):
Because unless you are extremely disciplined, code and the comments
describing them get out of sync. [...]
True, but that gets far worse with external docs. Do you have
Looking for tips and lessons learned (advice on what to do and
not do) for writing a Python based DSL.
Googling python dsl yields some wonderful content which I've just
started to read. If there are specific articles or 3rd party
libraries that you used to implement a DSL, I would appreciate
For me, diving into the data model really helped me grasp some of the
metaprogramming capabilities that python has, which is helping me as I am
implementing my own DSL in python.
http://docs.python.org/reference/datamodel.html
On Thu, Jul 7, 2011 at 10:20 AM, pyt...@bdurham.com wrote:
Looking
Greetings
I'm running Python (32b) in Windows7 (at 64bits) and I would like to know
how can I check if my machine is a 32b or 64b in Python. Is it possible? I
saw a few examples (like platform) but they only provide information about
Python not the machine.
Thanks
Toze
--
On 2011.07.07 10:21 AM, António Rocha wrote:
I'm running Python (32b) in Windows7 (at 64bits) and I would like to
know how can I check if my machine is a 32b or 64b in Python. Is it
possible? I saw a few examples (like platform) but they only provide
information about Python not the machine.
On Thu, Jul 7, 2011 at 2:30 AM, Ulrich Eckhardt
ulrich.eckha...@dominolaser.com wrote:
Even worse, most people would actually pay for its use, because they don't
use numbers large enough to merit the Schönhage–Strassen algorithm.
As it stands, Karatsuba is only used for numbers greater than a
On Thu, Jul 7, 2011 at 9:49 AM, Ian Kelly ian.g.ke...@gmail.com wrote:
On Thu, Jul 7, 2011 at 2:30 AM, Ulrich Eckhardt
ulrich.eckha...@dominolaser.com wrote:
Even worse, most people would actually pay for its use, because they don't
use numbers large enough to merit the Schönhage–Strassen
On Thu, Jul 7, 2011 at 1:12 AM, Ulrich Eckhardt
ulrich.eckha...@dominolaser.com wrote:
Just guessing, is it legacy, C-with-classes code rather than C++ code
perhaps? Haven't looked at wx for a while. Such code typically lacks
understanding of exceptions, which are the only way to signal failure
Hi,
Billy Mays wrote:
On 07/06/2011 04:02 PM, Ian Kelly wrote:
On Wed, Jul 6, 2011 at 1:30 PM, Billy Maysno...@nohow.com wrote:
I was looking through the python source and noticed that long
multiplication
is done using the Karatsuba method (O(~n^1.5)) rather than using FFTs
O(~n
On Thu, 07 Jul 2011, Andrew Berg wrote:
On 2011.07.07 10:21 AM, António Rocha wrote:
I'm running Python (32b) in Windows7 (at 64bits) and I would like to
know how can I check if my machine is a 32b or 64b in Python. Is it
possible? I saw a few examples (like platform) but they only provide
On 7/7/11 11:33 AM, Philip Reynolds wrote:
On Thu, 07 Jul 2011, Andrew Berg wrote:
On 2011.07.07 10:21 AM, António Rocha wrote:
I'm running Python (32b) in Windows7 (at 64bits) and I would like to
know how can I check if my machine is a 32b or 64b in Python. Is it
possible? I saw a few
On Thu, Jul 7, 2011 at 5:08 AM, dmitrey dmitre...@gmail.com wrote:
I feel lack of native Python lists operations (e.g. taking N greatest
elements with the involved key function and O(n) speed) and
occasionally found blist
http://pypi.python.org/pypi/blist/
Its entry says it is better than
2011/7/7 António Rocha toyze.ro...@gmail.com
Greetings
I'm running Python (32b) in Windows7 (at 64bits) and I would like to know
how can I check if my machine is a 32b or 64b in Python. Is it possible? I
saw a few examples (like platform) but they only provide information about
Python not
I just found the following url in my archives at work and
thought you might enjoy it:
http://thc.org/root/phun/unmaintain.html
/Martin
--
http://mail.python.org/mailman/listinfo/python-list
On Jul 5, 5:05 pm, Thomas Jollans t...@jollybox.de wrote:
On 06/27/2011 06:59 PM, miamia wrote:
Hello,
on 32-bit windows everything works ok but on 64-bit win I am getting
this error:
Traceback (most recent call last):
File app.py, line 1040, in do_this_now
File
Have you looked at
http://docs.python.org/library/collections.html#collections.deque ?
--
http://mail.python.org/mailman/listinfo/python-list
On Jul 7, 12:34 am, Gregory Ewing greg.ew...@canterbury.ac.nz wrote:
rantingrick wrote:
Yes but what benefit does that gain over say, Tkinter's design
(because that has been your argument).
Like I said, it's a tangential issue.
Agreed.
The important thing is that it's okay for an app to
On Jul 7, 1:30 am, Ulrich Eckhardt ulrich.eckha...@dominolaser.com
wrote:
Billy Mays wrote:
On 07/06/2011 04:02 PM, Ian Kelly wrote:
According to Wikipedia:
In practice the Schönhage–Strassen algorithm starts to outperform
older methods such as Karatsuba and Toom–Cook multiplication
I use cached dns lookups with pdnsd on my ubuntu machine to speed up web
access as regular lookups can take 15-30 seconds. However, python's
mechanize and urllib etc use socket.getaddrinfo, which seems not to be using
dns cacheing or taking a long time because of ipv6 lookups. In either case,
I
I have this simple palindrome program that yields different results
depending on whether I run it from Windows or from IDLE. The answer
is correct off IDLE, but why is this the case? Here's the code:
def reverse(text):
return text[::-1]
def is_palindrome(text):
return
On Fri, Jul 8, 2011 at 3:29 AM, rantingrick rantingr...@gmail.com wrote:
So your argument is:
A window hierarchy is bad because if your application requires
a user to open a gazillion windows (read as: designed poorly) --each
representing completely different transactions-- and if you
On Fri, Jul 8, 2011 at 4:18 AM, high bandwidth widebandwi...@gmail.com wrote:
I use cached dns lookups with pdnsd on my ubuntu machine to speed up web
access as regular lookups can take 15-30 seconds. However, python's
mechanize and urllib etc use socket.getaddrinfo, which seems not to be using
On 2011.07.07 12:22 PM, Martin Schöön wrote:
I just found the following url in my archives at work and
thought you might enjoy it:
http://thc.org/root/phun/unmaintain.html
That's awesome.
If a maintenance programmer can't quote entire Monty Python movies
from memory, he or she has *no*
In 842fce9d-1b3f-434a-b748-a6dc4828c...@h12g2000pro.googlegroups.com linda
posts...@gmail.com writes:
I have this simple palindrome program that yields different results
depending on whether I run it from Windows or from IDLE. The answer
is correct off IDLE, but why is this the case? Here's
linda wrote:
I have this simple palindrome program that yields different results
depending on whether I run it from Windows or from IDLE. The answer
is correct off IDLE, but why is this the case? Here's the code:
def reverse(text):
return text[::-1]
def is_palindrome(text):
return
On 07/07/2011 19:18, linda wrote:
I have this simple palindrome program that yields different results
depending on whether I run it from Windows or from IDLE. The answer
is correct off IDLE, but why is this the case? Here's the code:
def reverse(text):
return text[::-1]
def
John Gordon wrote:
By the way, I could not make your program work as you provided it; I had
to replace input() with raw_input(). Does it really work for you this way?
input() is the 3.x name for raw_input()
~Ethan~
--
http://mail.python.org/mailman/listinfo/python-list
On 07/07/2011 19:37, John Gordon wrote:
In842fce9d-1b3f-434a-b748-a6dc4828c...@h12g2000pro.googlegroups.com
lindaposts...@gmail.com writes:
I have this simple palindrome program that yields different results
depending on whether I run it from Windows or from IDLE. The answer
is correct off
Hello,
I'm trying to access a hardware board of my company through a serial
connection using a Python script and the pyserial module.
I use Python 2.7.1 with Ubuntu 11.04 (pyserial is the package python-
serial with version 2.5.2, http://pyserial.sourceforge.net/pyserial_api.html).
The board to
Hi!
I'm trying to share data between processes using
multiprocessing.Manager and
creating shared Namespace. I have the following code:
from multiprocessing import Manager
from scipy import rand
x = rand(5000, 5000)
m = Manager()
n = m.Namespace()
n.x = x
It seems that at n.x = x data is
I tried something = input('enter text:').rstrip('\n') as suggested but
the problem persists. BTW, the intermediate print commands agree and
so are not an issue. The disagreement is in IDLE correctly
identifying palindromes and Windows not. I do suspect it may be a
trailing '\r' issue. Is there
linda wrote:
I tried something = input('enter text:').rstrip('\n') as suggested but
the problem persists. BTW, the intermediate print commands agree and
so are not an issue. The disagreement is in IDLE correctly
identifying palindromes and Windows not. I do suspect it may be a
trailing '\r'
On Jul 7, 2:42 pm, Ethan Furman et...@stoneleaf.us wrote:
linda wrote:
I tried something = input('enter text:').rstrip('\n') as suggested but
the problem persists. BTW, the intermediate print commands agree and
so are not an issue. The disagreement is in IDLE correctly
identifying
On Jul 7, 5:08 am, dmitrey dmitre...@gmail.com wrote:
hi all,
I feel lack of native Python lists operations (e.g. taking N greatest
elements with the involved key function and O(n) speed)
Take a look at heapq.nlargest()...
and
occasionally found blisthttp://pypi.python.org/pypi/blist/
Its
On Thu, Jul 7, 2011 at 7:18 AM, Grant Edwards invalid@invalid.invalid wrote:
On 2011-07-06, Waldek M. wm@localhost.localdomain wrote:
Dnia Wed, 06 Jul 2011 03:36:24 +1000, Steven D'Aprano napisa?(a):
Because unless you are extremely disciplined, code and the comments
describing them get out
rantingrick wrote:
On Jul 7, 12:34 am, Gregory Ewing greg.ew...@canterbury.ac.nz wrote:
The important thing is that it's okay for an app to stay
alive until its *last* top level window is closed.
I partially disagree with Greg on this. This is not the only model: on the
Apple Mac, or any
Andrew Berg wrote:
On 2011.07.07 08:39 AM, Phlip wrote:
On Jul 7, 6:24 am, Andrew Berg bahamutzero8...@gmail.com wrote:
On 2011.07.07 08:11 AM, Phlip wrote: No, I was pointing out that
passing a type is more ... typesafe.
None is a type.
I never said it wasn't.
Unfortunately, it
rantingrick wrote:
So you prefer to close a gazillion windows one by one?
If I want to close all the windows, I can use the application's
Quit or Exit command, or whatever the platform calls it.
(Note that if there is a separate instance of the application
for each window -- as was suggested
On 2011.07.07 08:46 PM, Steven D'Aprano wrote:
None is not a type, it is an instance.
isinstance(None, type) # is None a type?
False
isinstance(None, type(None)) # is None an instance of None's type?
True
So None is not itself a type, although it *has* a type:
type(None)
type
On Jul 7, 11:36 am, Andrew Berg bahamutzero8...@gmail.com wrote:
On 2011.07.07 12:22 PM, Martin Schöön wrote: I just found the following url
in my archives at work and
thought you might enjoy it:
http://thc.org/root/phun/unmaintain.html
That's awesome.
That's How To Write Unmaintainable
I worded that poorly. None is (AFAIK) the only instance of NoneType, but
I should've clarified the difference. The is operator does not compare
types, it compares instances for identity.
None is typesafe, because it's strongly typed.
However, what's even MORE X-safe (for various values of X)
On Thu, Jul 7, 2011 at 12:34 PM, yorick yorick.bru...@gmail.com wrote:
Hello,
I'm trying to access a hardware board of my company through a serial
connection using a Python script and the pyserial module.
I use Python 2.7.1 with Ubuntu 11.04 (pyserial is the package python-
serial with
I bring you a source of entertaintment.Just visit the following link
and know about Bollywood actresses
www.bollywoodactresseshotpictures.blogspot.com
--
http://mail.python.org/mailman/listinfo/python-list
Matt Joiner anacro...@gmail.com added the comment:
What's the status of this bug? This is a very useful feature, I've had to use
and add bindings to monotonic times for numerous applications. Can it make it
into 3.3?
--
___
Python tracker
Changes by Saul Spatz saul.sp...@gmail.com:
--
nosy: +spatz123
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue8271
___
___
Python-bugs-list mailing
New submission from Andreas Hasenkopf webmas...@hasenkopf2000.net:
I'm using 64bit Arch Linux and Python 2.7.2 compiled with GCC 4.6.1.
I have noticed in several ocassions that the interpreter is complaining about
AttributeError: XMLGenerator instance has no attribute '_write' (in case of
Changes by STINNER Victor victor.stin...@haypocalc.com:
--
nosy: +haypo
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue9242
___
___
Changes by STINNER Victor victor.stin...@haypocalc.com:
--
nosy: +haypo
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue5505
___
___
STINNER Victor victor.stin...@haypocalc.com added the comment:
Leaving open to discuss whether anything can/should be done
for the case when reindent acts as an stdin
sys.stdin.buffer and sys.stdout.buffer should be used with
tokenize.detect_encoding(). We may read first stdin and write it
Changes by STINNER Victor victor.stin...@haypocalc.com:
--
components: +Unicode
nosy: +haypo
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue10284
___
STINNER Victor victor.stin...@haypocalc.com added the comment:
Can't you only work with Unicode and avoid the MBCS encoding?
--
nosy: +haypo
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue10945
Changes by STINNER Victor victor.stin...@haypocalc.com:
--
nosy: +haypo
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue10872
___
___
New submission from STINNER Victor victor.stin...@haypocalc.com:
The following code fails with an AssertionError('###\ufeffdef'):
import codecs
_open = codecs.open
#_open = open
filename = test
with _open(filename, 'w', encoding='utf_16') as f:
f.write('abc')
pos = f.tell()
with
STINNER Victor victor.stin...@haypocalc.com added the comment:
There is a similar bug for append mode:
import codecs
_open = codecs.open
#_open = open
filename = test
with _open(filename, 'w', encoding='utf_16') as f:
f.write('abc')
with _open(filename, 'a', encoding='utf_16') as f:
Roundup Robot devnull@devnull added the comment:
New changeset a4405b799e1b by Vinay Sajip in branch 'default':
Closes #12391: temporary files are now cleaned up.
http://hg.python.org/cpython/rev/a4405b799e1b
--
nosy: +python-dev
resolution: - fixed
stage: commit review -
Hans Bering hans.ber...@arcor.de added the comment:
Ok, _now_ I have run into the same problem. I have attached a small script
similar to the original entry (but shorter) which will reliably crash with
Python 3.1.4 on Windows 7 (64bit) when using a locale with a comma decimal
fraction marker
Changes by Hans Bering hans.ber...@arcor.de:
Removed file: http://bugs.python.org/file22535/tkinterCrash.py
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue10647
___
Andreas Stührk andy-pyt...@hammerhartes.de added the comment:
Attached is a patch that replaces `lib2to3.fixer_Base.BaseFix.set_filename()`
during tests. With the patch applied, I don't get any refleaks for packaging.
Another approach would be to simply remove the logging attribute of lib2to3
Ralf Schlatterbeck r...@runtux.com added the comment:
On Thu, Jul 07, 2011 at 10:52:51AM +, STINNER Victor wrote:
Can't you only work with Unicode and avoid the MBCS encoding?
I'm trying to build a windows binary package on Linux. This usually
works fine -- as long as the package
New submission from STINNER Victor victor.stin...@haypocalc.com:
The following test fails with an AssertionError('a' != 'b') on the first read.
import codecs
FILENAME = 'test'
with open(FILENAME, 'wb') as f:
f.write('abcd'.encode('utf-8'))
with codecs.open(FILENAME, 'r+',
Andreas Hasenkopf webmas...@hasenkopf2000.net added the comment:
I'd like to mention that Python 2.6.7 does not show this erroneous behavior. In
Python 2.6.7 I can call the _write method of xml.sax.saxutils.XMLGenerator...
Is this a bug or a feature in 2.7??
--
components: -XML
Andreas Hasenkopf webmas...@hasenkopf2000.net added the comment:
The problem appeared to be the package from the Arch Linux repo.
Compiling the source codes myselfes gave me a Python interpreter not showing
this bug...
--
resolution: - accepted
status: open - closed
Changes by bjorn lofdahl bjorn.lofd...@gmail.com:
--
versions: +Python 3.1, Python 3.2, Python 3.3, Python 3.4 -Python 2.6, Python
2.7
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue12506
Changes by bjorn lofdahl bjorn.lofd...@gmail.com:
--
versions: +Python 2.6, Python 2.7
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue12506
___
___
Changes by Benjamin Peterson benja...@python.org:
--
resolution: accepted - invalid
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue12511
___
___
New submission from Gareth Rees g...@garethrees.org:
If you call timeit.timeit and the timed code raises an exception, then garbage
collection is disabled. I have verified this in Python 2.7 and 3.2. Here's an
interaction with Python 3.2:
Python 3.2 (r32:88445, Jul 7 2011, 15:52:49)
Éric Araujo mer...@netwok.org added the comment:
Senthil, I’m not sure you read Alexander’s reply on Rietveld before committing.
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue10403
___
Gareth Rees g...@garethrees.org added the comment:
Patch attached.
--
keywords: +patch
Added file: http://bugs.python.org/file22605/issue12514.patch
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue12514
Changes by Raymond Hettinger raymond.hettin...@gmail.com:
--
assignee: - rhettinger
nosy: +rhettinger
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue12514
___
Raymond Hettinger raymond.hettin...@gmail.com added the comment:
Thank you. The patch looks correct. I will apply it as soon as I get a chance.
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue12514
New submission from xavierd xdelan...@cloudmark.com:
the function 'email.message_from_file' modifies the message structure when the
parsed is invalid (for example, when a closed boudary is missing). The
attribute defects is also empty
In the attachment (sample.tgz) you will find:
-
Éric Araujo mer...@netwok.org added the comment:
Thanks for that! I agree that it’s a fake optimization to work with generators
instead of lists when the list is small or when we depend on other resources
like file handles. There are a few methods we could change in the database
module.
Éric Araujo mer...@netwok.org added the comment:
Thanks a lot for the diagnosis.
To fix it, I don’t find the monkey-patching approach very good, I’d prefer
properly using the logging API to remove handlers upon cleanup. Would you like
to look into that?
--
Antoine Pitrou pit...@free.fr added the comment:
To fix it, I don’t find the monkey-patching approach very good, I’d
prefer properly using the logging API to remove handlers upon cleanup.
I don't think such stuff exists.
--
___
Python tracker
Éric Araujo mer...@netwok.org added the comment:
See http://hg.python.org/cpython/file/tip/Lib/packaging/tests/support.py#l81
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue12167
___
Antoine Pitrou pit...@free.fr added the comment:
See http://hg.python.org/cpython/file/tip/Lib/packaging/tests/support.py#l81
AFAIU, the problem is that 2to3 creates a whole new logger for each
different file. So it's not about cleaning the handlers, but cleaning up
the loggers as well. And
Éric Araujo mer...@netwok.org added the comment:
Thanks for clarifying, I had misread. IMO, using one logger per file is a
lib2to3 bug.
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue12167
1 - 100 of 130 matches
Mail list logo