[issue4428] io.BufferedWriter does not observe buffer size limits

2008-11-29 Thread David M. Beazley
David M. Beazley <[EMAIL PROTECTED]> added the comment: I agree with previous comments that write() should definitely write all data when in blocking mode. ___ Python tracker <[EMAIL PROTECTED]> <http://bugs.pytho

[issue4517] improve __getattribute__ documentation

2008-12-03 Thread David W. Lambert
New submission from David W. Lambert <[EMAIL PROTECTED]>: http://docs.python.org/dev/3.0/reference/datamodel.html#special-lookup (After fixing the link to http://docs.python.org/3.0 at http://www.python.org/doc/ (and likewise the http://docs.python.org/whatsnew/3.0.html link.)... The c

[issue4517] improve __getattribute__ documentation

2008-12-03 Thread David W. Lambert
David W. Lambert <[EMAIL PROTECTED]> added the comment: >>> class c: ... def __getattribute__(self,*args): ... print('getattribute chimes in') ... >>> c()+3 Traceback (most recent call last): File "", line 1, in TypeError: uns

[issue4518] broken link to python 3 doc on main doc page

2008-12-03 Thread David W. Lambert
David W. Lambert <[EMAIL PROTECTED]> added the comment: Meanwhile, use http://docs.python.org/dev/3.0/ -- nosy: +LambertDW ___ Python tracker <[EMAIL PROTECTED]> <http://bugs.pytho

[issue4518] broken link to python 3 doc on main doc page

2008-12-03 Thread David W. Lambert
Changes by David W. Lambert <[EMAIL PROTECTED]>: -- nosy: -LambertDW ___ Python tracker <[EMAIL PROTECTED]> <http://bugs.python.org/issue4518> ___ __

[issue4523] logging module __init__ uses has_key

2008-12-04 Thread R. David Murray
New submission from R. David Murray <[EMAIL PROTECTED]>: I ran my ap with -3 and got the following: /usr/lib/python2.6/logging/__init__.py:849: DeprecationWarning: dict.has_key() not supported in 3.x; use the in operator -- components: Library (Lib) messages: 76883 nosy: bit

[issue4534] problem with str.join - should work with list input, error says requires 'str' object

2008-12-04 Thread David W. Lambert
David W. Lambert <[EMAIL PROTECTED]> added the comment: Try this--- def List_to_String(lis,separator=''): return separator.join(lis) -- nosy: +LambertDW ___ Python tracker <[EMAIL PROTECTED]> <http://

[issue4534] problem with str.join - should work with list input, error says requires 'str' object

2008-12-04 Thread David W. Lambert
David W. Lambert <[EMAIL PROTECTED]> added the comment: I did this to find out what are str.join's arguments--- $ python3 -c 'help(str.join)' Help on method_descriptor: join(...) S.join(sequence) -> str Return a string which is the concatenation of the str

[issue4541] Add str method for removing leading or trailing substrings

2008-12-05 Thread David W. Lambert
David W. Lambert <[EMAIL PROTECTED]> added the comment: Opinion---"Batteries included" doesn't mean "a bewildering variety of functions". Nor does it mean "my programming language has a checklist of features" such as I recall the spreadsheet and word

[issue4517] improve __getattribute__ documentation

2008-12-05 Thread David W. Lambert
David W. Lambert <[EMAIL PROTECTED]> added the comment: Yes to msg77021. However! I'll pin the difficulty specifically to the word "may". This cost me a lot of time. 1) Please change the phrasing you quoted to "... implicit special method lookup bypasses the __ge

[issue4561] Optimize new io library

2008-12-06 Thread David M. Beazley
David M. Beazley <[EMAIL PROTECTED]> added the comment: I've done some profiling and the performance of reading line-by-line is considerably worse in Python 3 than in Python 2. For example, this code: for line in open("somefile.txt"): pass Ran 35 times slower in P

[issue4561] Optimize new io library

2008-12-06 Thread David M. Beazley
David M. Beazley <[EMAIL PROTECTED]> added the comment: Tried this using projects/python/branches/release30-maint and using the patch that was just attached. With a 66MB input file, here are the results of this code fragment: for line in open("BIGFILE): pass Python 2.6: 0

[issue4561] Optimize new io library

2008-12-06 Thread David M. Beazley
David M. Beazley <[EMAIL PROTECTED]> added the comment: Just as one other followup, if you change the code in the last example to use binary mode like this: for line in open("BIG","rb"): pass You get the following results: Python 2.6: 0.64s Python 3.0:

[issue4561] Optimize new io library

2008-12-06 Thread David M. Beazley
David M. Beazley <[EMAIL PROTECTED]> added the comment: Just checked it with branches/py3k and the performance is the same. ___ Python tracker <[EMAIL PROTECTED]> <http://bugs.pytho

[issue4561] Optimize new io library

2008-12-06 Thread David M. Beazley
David M. Beazley <[EMAIL PROTECTED]> added the comment: bash-3.2$ uname -a Darwin david-beazleys-macbook.local 9.5.1 Darwin Kernel Version 9.5.1: Fri Sep 19 16:19:24 PDT 2008; root:xnu-1228.8.30~1/RELEASE_I386 i386 bash-3.2$ ./python.exe -c "import sys; print(sys.version)" 3

[issue4593] Documentation for multiprocessing - Pool.apply()

2008-12-08 Thread David M. Beazley
New submission from David M. Beazley <[EMAIL PROTECTED]>: The documentation for the apply() and apply_async() methods of a Pool object might emphasize that these operations execute func(*args,**kwargs) in only one of the pool workers and that func() is not being executed in parallel

[issue2899] Fixers find, rfind, etc in 'string' module

2008-12-08 Thread David W. Lambert
David W. Lambert <[EMAIL PROTECTED]> added the comment: I expect the answer will be that 2to3 cannot know what sort of object "string" names. Bell's theorem, or some such, as I understand it, tells us that you must execute the algorithm to find out what it does, there i

[issue4596] 2to3 does not fail as early as possible.

2008-12-08 Thread David W. Lambert
New submission from David W. Lambert <[EMAIL PROTECTED]>: $ #rm -f file_that_is_not_here.py $ 2to3 file_that_is_not_here.py The program spends considerable time preparing itself only to discover that it cannot open the file. -- components: 2to3 (2.x to 3.0 conversion tool) me

[issue2899] Fixers find, rfind, etc in 'string' module

2008-12-08 Thread David W. Lambert
David W. Lambert <[EMAIL PROTECTED]> added the comment: I think the point is to get a message from 2to3 about possible use of feature that is gone. Of course python3 raises an exception when trying to execute the code, but it does leave the user wondering "why did 2to3 report that t

[issue4593] Documentation for multiprocessing - Pool.apply()

2008-12-08 Thread David M. Beazley
David M. Beazley <[EMAIL PROTECTED]> added the comment: Actually, you shouldn't discount the potential usefulness of running apply() in all of the worker nodes. A lot of people coming from parallel programming know about things like global broadcasts, reductions, and so forth.

[issue4596] 2to3 does not fail as early as possible.

2008-12-08 Thread David W. Lambert
David W. Lambert <[EMAIL PROTECTED]> added the comment: Granted, this isn't the hottest issue circulating. ___ Python tracker <[EMAIL PROTECTED]> <http://bugs.

[issue4606] Passing 'None' if argtype is set to POINTER(...) doesn't always result in NULL

2008-12-09 Thread David W. Lambert
Changes by David W. Lambert <[EMAIL PROTECTED]>: -- nosy: +LambertDW ___ Python tracker <[EMAIL PROTECTED]> <http://bugs.python.org/issue4606> ___ __

[issue4619] Invalid Behaviour When a Default Argument is a Mutable Object

2008-12-10 Thread David W. Lambert
David W. Lambert <[EMAIL PROTECTED]> added the comment: Mutable function arguments and class variables are python's mechanisms to provide data persistence at these scope levels. Quite opposite of design flaw, they are necessary! Write a decorator to change the behavior where yo

[issue4622] SequenceMatcher bug with long sequences

2008-12-10 Thread David W. Lambert
David W. Lambert <[EMAIL PROTECTED]> added the comment: Python 3.0rc1+ similar. -- nosy: +LambertDW versions: +Python 3.0 ___ Python tracker <[EMAIL PROTECTED]> <http://bugs.pytho

[issue4634] 2to3 should fix "import HTMLParser"

2008-12-11 Thread David W. Lambert
David W. Lambert added the comment: It is hard. Although you know what you mean, 2to3 has no way to know for instance, that you never run your program with working directory containing file HTMLParser.py. 2to3 could offer a suggestion rather than reporting no change required. This issue is

[issue4640] optparse - dosn't distinguish between '--option' and '-option'

2008-12-12 Thread David W. Lambert
David W. Lambert added the comment: When I use it on python 3 optparse reports no such option -e, which is correct since the form -debug permits a run of single character options. -- nosy: +LambertDW ___ Python tracker <http://bugs.python.

[issue4649] Fix a+b to a + b

2008-12-12 Thread David W. Lambert
David W. Lambert added the comment: I do think your interpretation of PEP8 is overly strict. Here's the source code of the first j interpreter. (Ken Iverson) typedef char C;typedef long I; typedef struct a{I t,r,d[3],p[2];}*A; #define P printf #define R return #define V1(f) A f(

[issue4649] Fix a+b to a + b

2008-12-12 Thread David W. Lambert
David W. Lambert added the comment: That phrase of PEP 8 means to me "Use spaces to visually group expressions according to precedence." ___ Python tracker <http://bugs.python.

[issue4561] Optimize new io library

2008-12-16 Thread David M. Beazley
David M. Beazley added the comment: I wish I shared your optimism about this, but I don't. Here's a short explanation why. The problem of I/O and the associated interface between hardware, the operating system kernel, and user applications is one of the most fundamental and

[issue4561] Optimize new io library

2008-12-16 Thread David M. Beazley
David M. Beazley added the comment: Good luck with that. Most people who get bright ideas such as "gee, maybe I'll write my own version of X" where "X" is some part of the standard C library pertaining to I/O, end up fighting a losing battle. Of course, I'd

[issue4561] Optimize new io library

2008-12-16 Thread David M. Beazley
David M. Beazley added the comment: I agree with Raymond. For binary reads, I'll go farther and say that even a 10% slowdown in performance would be surprising if not unacceptable to some people. I know that as hard as it might be for everyone to believe, there are a lot of peopl

[issue4680] Queue class should include high-water mark

2008-12-16 Thread David W. Lambert
Changes by David W. Lambert : -- nosy: +LambertDW ___ Python tracker <http://bugs.python.org/issue4680> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue4686] Exceptions in ConfigParser don't set .args

2008-12-17 Thread David M. Beazley
New submission from David M. Beazley : The ConfigParser module defines a variety of custom exceptions, many of which take more than one argument (e.g., InterpolationError, NoOptionError, etc.). However, none of these exceptions properly set the .args attribute. For example, shouldn&#

[issue4615] de-duping function in itertools

2008-12-18 Thread David W. Lambert
David W. Lambert added the comment: (but of course with imap in version 2.7 and with something else in version 3.x) -- nosy: +LambertDW ___ Python tracker <http://bugs.python.org/issue4

[issue4694] _call_method() in multiprocessing documentation

2008-12-18 Thread David M. Beazley
New submission from David M. Beazley : The documentation for "Proxy Objects" in the multiprocessing module describes a method "_call_method" and gives various examples. The only problem is that the method is actually called "_callmethod" (i.e., no undersc

[issue4694] _call_method() in multiprocessing documentation

2008-12-18 Thread David M. Beazley
David M. Beazley added the comment: The _get_value() method is also in error. It's called "_getvalue()" in the source code. ___ Python tracker <http://bugs.py

[issue4695] Bad AF_PIPE address in multiprocessing documentation

2008-12-18 Thread David M. Beazley
New submission from David M. Beazley : In the "Address Formats" part of the "Listeners and Clients" section of the documentation for the multiprocessing module, AF_PIPE addresses are described as having this format: r'ServerName\\pipe\\PipeName'

[issue1194378] sendmsg() and recvmsg() for C socket module

2008-12-24 Thread David M. Beazley
David M. Beazley added the comment: Bump. This functionality seems to be needed if anyone is going to be messing around with advanced features of IPv6. As it stands, the socket module in Python 2.6/3.0 is incomplete without this. -- nosy: +beazley

[issue4744] asynchat documentation needs to be more precise

2008-12-24 Thread David M. Beazley
New submission from David M. Beazley : The documentation for asynchat needs to be more precise in its use of strings vs. bytes. Unless the undocumented use_encoding attribute is set, it seems that all data should be bytes throughout (e.g., the terminator, inputs to push methods, etc.). I

[issue1194378] sendmsg() and recvmsg() for C socket module

2008-12-27 Thread David M. Beazley
David M. Beazley added the comment: Just a followup comment to note that adding support for sendmsg()/recvmsg() is what you need to do "file descriptor passing" between processes on Unix---another technique for writing network servers. ___ Pyth

[issue4758] Python 3.0 internet documentation needs work

2008-12-27 Thread David M. Beazley
New submission from David M. Beazley : I have recently completed a pretty thorough survey of library documentation for Python 3.0 in conjunction with an update I'm making to my book. This issue is not so much a bug as a documentation request. For all of the library modules relat

[issue4760] cmp gone---What's new in 3.1

2008-12-27 Thread David W. Lambert
New submission from David W. Lambert : http://docs.python.org/dev/3.0/whatsnew/3.1.html To Other Language Changes add cmp removed. I haven't installed version 3.1; I don't know if it has actually been removed. -- assignee: georg.brandl components: Documentation messages:

[issue4766] email documentation needs to be precise about strings/bytes

2008-12-29 Thread David M. Beazley
New submission from David M. Beazley : Documentation for the email package needs to be more clear about the usage of strings and bytes. In particular: 1. All operations that parse email messages such as message_from_file() or message_from_string() operate on *text*, not binary data. So

[issue4767] email.mime incorrectly documented (or implemented)

2008-12-29 Thread David M. Beazley
New submission from David M. Beazley : The documentation describes classes such as email.mime.MIMEText() email.mime.MIMEMultipart() email.mime.MIMEApplication() etc... However, it's confusing because none of these classes are actually found in email.mime. Suggest either using the full p

[issue4768] email.generator.Generator object bytes/str crash - b64encode() bug?

2008-12-29 Thread David M. Beazley
New submission from David M. Beazley : The email.generator.Generator class does not work correctly message objects created with binary data (MIMEImage, MIMEAudio, MIMEApplication, etc.). For example: >>> from email.mime.image import MIMEImage >>> data = open("IMG.

[issue4769] b64decode should accept strings or bytes

2008-12-29 Thread David M. Beazley
New submission from David M. Beazley : The whole point of base64 encoding is to safely encode binary data into text characters. Thus, the base64.b64decode() function should equally accept text strings or binary strings as input. For example, there is a reasonable expectation that something

[issue4769] b64decode should accept strings or bytes

2008-12-29 Thread David M. Beazley
David M. Beazley added the comment: Note: This problem applies to all of the other decoders/encoders in the base64 too (b16, b32, etc.) ___ Python tracker <http://bugs.python.org/issue4

[issue4770] binascii module, crazy error messages, unexpected behavior

2008-12-29 Thread David M. Beazley
New submission from David M. Beazley : See Issue 4869 for a related bug. Most of the functions in binascii are meant to go from binary data to textual representations (hex digits, base64, binhex, etc.). There are numerous problems: 1. Misleading error messages. For example

[issue4770] binascii module, crazy error messages, unexpected behavior

2008-12-29 Thread David M. Beazley
David M. Beazley added the comment: Given the low-level nature of this module, I can understand the motivation to make it all bytes. However, I'm going to respectfully disagree with that and claim that making binascii all bytes really goes against the whole spirit of what Python 3.

[issue4771] Bad examples in hashlib documentation

2008-12-29 Thread David M. Beazley
New submission from David M. Beazley : The hashlib documentation has incorrect examples showing the use of the hexdigest() method: >>> hashlib.sha224(b"Nobody inspects the spammish repetition").hexdigest() b'a4337bc45a8fc544c03f52dc550cd6e1e87021bc896588bd79e901e2&#

[issue4771] Bad examples in hashlib documentation

2008-12-29 Thread David M. Beazley
David M. Beazley added the comment: The digest() method of hashes does produce bytes (correct). The hexdigest() method produces a string, but it is also shown as producing bytes in the examples. ___ Python tracker <http://bugs.python.org/issue4

[issue4773] HTTPMessage not documented and has inconsistent API across 2.6/3.0

2008-12-29 Thread David M. Beazley
New submission from David M. Beazley : A file-like object u returned by the urlopen() function in both Python 2.6/3.0 has a method info() that returns a 'HTTPMessage' object. For example: ::: Python 2.6 >>> from urllib2 import urlopen >>> u = urlopen("ht

[issue4773] HTTPMessage not documented and has inconsistent API across 2.6/3.0

2008-12-29 Thread David M. Beazley
David M. Beazley added the comment: Verified that 2to3 does not fix this. ___ Python tracker <http://bugs.python.org/issue4773> ___ ___ Python-bugs-list mailing list Unsub

[issue4782] json documentation missing load(), loads()

2008-12-30 Thread David M. Beazley
New submission from David M. Beazley : Documentation for the json module in Python 2.6 and Python 3.0 doesn't have any description for load() or loads() even though both functions are used in the examples. -- assignee: georg.brandl components: Documentation messages: 78542

[issue4783] json documentation needs a BAWM (Big A** Warning Message)

2008-12-30 Thread David M. Beazley
New submission from David M. Beazley : The json module is described as having an interface similar to pickle: json.dump() json.dumps() json.load() json.loads() I think it would be a WISE idea to add a huge warning message to the documentation that these functions should *NOT

[issue4785] json.JSONDecoder() strict argument undocumented and potentially confusing

2008-12-30 Thread David M. Beazley
New submission from David M. Beazley : The strict parameter to JSONDecoder() is undocumented and is confusing because someone might assume it has something to do with the encoding parameter or the general handling of parsing errors (which it doesn't). As far as I can determine by readin

[issue4769] b64decode should accept strings or bytes

2008-12-30 Thread David M. Beazley
David M. Beazley added the comment: One more followup. The quopri module (which is highly related to base64 in that quopri and base64 are often used together within MIME) does accept both unicode and byte strings when decoding. For example, this works: >>> quopri.decodestri

[issue4783] json documentation needs a BAWM (Big A** Warning Message)

2008-12-30 Thread David M. Beazley
David M. Beazley added the comment: Just consider me to be an impartial outside reviewer. Hypothetically, let's say I'm a Python programmer who knows a thing or two about standard library modules (like pickle), but I'm new to JSON so I come looking at the json module docum

[issue4783] json documentation needs a BAWM (Big A** Warning Message)

2008-12-30 Thread David M. Beazley
David M. Beazley added the comment: Thanks! Hopefully I'm not giving you too much work to do :-). Cheers, Dave ___ Python tracker <http://bugs.python.org/i

[issue4786] xml.etree.ElementTree module name in Python 3

2008-12-30 Thread David M. Beazley
New submission from David M. Beazley : Not a bug, but a question to developers: Is xml.etree.ElementTree going to be the only standard library module in Python 3.0 that doesn't follow the standard Python 3.0 module naming conventions? (e.g., socketserver, configparser, etc.). Are ther

[issue4794] garbage collector blocks and takes worst-case linear time wrt number of objects

2008-12-31 Thread David W. Lambert
Changes by David W. Lambert : -- nosy: +LambertDW ___ Python tracker <http://bugs.python.org/issue4794> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue4820] ctypes.util.find_library incorrectly documented

2009-01-03 Thread David M. Beazley
New submission from David M. Beazley : In the "ctypes reference / Finding shared libraries" section of the ctypes documentation, the find_library() function is described as being located in ctypes.util. However, it's formal description right below that lists it as ctyp

[issue4831] exec() behavior - revisited

2009-01-04 Thread David M. Beazley
David M. Beazley added the comment: One further followup just to make sure I'm clear. Is it always safe to pass the result of locals() into exec and extract the result as shown in my example? Since I'm writing about this in a book, I just want to make absolutely certain I k

[issue4831] exec() behavior - revisited

2009-01-04 Thread David M. Beazley
New submission from David M. Beazley : Please forgive me, but I'm really trying to wrap my brain around the behavior of exec() in Python 3. Here's a quote from the documentation: "In all cases, if the optional parts are omitted, the code is executed in the current s

[issue4816] Patch of itertools.{combinations, permutations} for empty combinations

2009-01-07 Thread David W. Lambert
David W. Lambert added the comment: Mathematica returns an empty list. In[1]:= Permutations[{1,2},{1}] Out[1]= {{1}, {2}} In[2]:= Permutations[{1,2},{4}] Out[2]= {} In[3]:= -- nosy: +LambertDW ___ Python tracker <http://bugs.python.

[issue4816] Patch of itertools.{combinations, permutations} for empty combinations

2009-01-07 Thread David W. Lambert
David W. Lambert added the comment: Mathematica indicates for the user to define it later. An error. In[3]:= Permutations[{1,2},{-2}] Permutations::nninfseq: Position 2 of Permutations[{1, 2}, {-2}] must be All, Infinity, a non-negative integer, or a List whose first element

[issue4816] Patch of itertools.{combinations, permutations} for empty combinations

2009-01-07 Thread David W. Lambert
David W. Lambert added the comment: I try to "not know" excel. Does it have any other means to represent an empty set? ___ Python tracker <http://bugs.python.

[issue4816] Patch of itertools.{combinations, permutations} for empty combinations

2009-01-07 Thread David W. Lambert
David W. Lambert added the comment: I had thought highly of the "mull it over for a week" plan. After a week we'd decide to follow Stephen Wolfram's lead, which seems to be the current patch. I haven't yet used the python permutations iterator, although I used to

[issue1202] zlib.crc32() and adler32() return value

2009-01-08 Thread J. David Ibáñez
J. David Ibáñez added the comment: I believe I have hit this bug. With Python 2.6.1 in a Gentoo Linux 64 bits. This code: from zipfile import ZipFile inzip = ZipFile('Document.odt') outzip = ZipFile('out.zip', 'w') for f in inzip.infolist():

[issue4899] doctest should support fixtures

2009-01-09 Thread David W. Lambert
David W. Lambert added the comment: I disagree. Purpose of __doc__ is to explain functionality all at once. This command idiom is useful: $ python -c 'from a_module import thing; help(thing)' The doctest module is a lightweight nicety that helps verify that which is suit

[issue4903] binascii.crc32()

2009-01-09 Thread David M. Beazley
New submission from David M. Beazley : The result of binascii.crc32() is different on the same input in Python 2.6/3.0. For example: Python 2.6: >>> binascii.crc32('Hello') -137262718 Python 3.0: >>> binascii.crc32(b'Hello') 4157704578 -- com

[issue4903] binascii.crc32()

2009-01-09 Thread David M. Beazley
David M. Beazley added the comment: Can someone PLEASE make sure this gets documented someplace. ___ Python tracker <http://bugs.python.org/issue4903> ___ ___ Python-bug

[issue4903] binascii.crc32()

2009-01-10 Thread David M. Beazley
David M. Beazley added the comment: Placing a note in the standard library documentation would be a start. Just say in Python 3.0 it always returns the result as an unsigned integer whereas in Python 2.6 a 32-bit signed integer is returned. Although the numerical value may differ between

[issue4760] cmp gone documentations

2009-01-12 Thread David W. Lambert
David W. Lambert added the comment: http://docs.python.org/dev/3.1/library/unittest.html#module-unittest Search for "cmp". There are two references. I apologize if I misunderstand issue 1717, -- title: cmp gone---What's new in 3.1 -> cmp g

[issue4925] Improve error message of subprocess

2009-01-12 Thread David W. Lambert
David W. Lambert added the comment: Related, but outside python realm, this error likewise confuses: $ cat < s.sh #! invalid path echo hi EOF $ ./s.sh zsh: no such file or directory: ./s.sh -- nosy: +LambertDW ___ Python tracker &l

[issue4925] Improve error message of subprocess

2009-01-12 Thread David W. Lambert
David W. Lambert added the comment: (Actual command stream includes chmod +x ./s.sh) ___ Python tracker <http://bugs.python.org/issue4925> ___ ___ Python-bugs-list mailin

[issue4899] doctest should support fixtures

2009-01-13 Thread David W. Lambert
David W. Lambert added the comment: My goodness, that's the starting base sequence to gene 38c, chromosome 4 of the Columbian caldera cricket! But seriously... 1) The relevant part of the doc string is this, and this is how it should read (your argument being "if doctests prov

[issue4899] doctest should support fixtures

2009-01-13 Thread David W. Lambert
David W. Lambert added the comment: For unittests I recommend two things instead of need for doctest change. A decoupled strict test to prove that the iterator works, and this class to publish, class Tped_use_cases(...): def test_Marker_iteration(self

[issue4994] subprocess (Popen) doesn't works properly

2009-01-18 Thread David W. Lambert
Changes by David W. Lambert : -- nosy: +LambertDW ___ Python tracker <http://bugs.python.org/issue4994> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue5028] tokenize.generate_tokens doesn't always return logical line

2009-01-21 Thread David W. Lambert
Changes by David W. Lambert : -- nosy: +LambertDW ___ Python tracker <http://bugs.python.org/issue5028> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue5029] Odd slicing behaviour

2009-01-21 Thread David W. Lambert
Changes by David W. Lambert : -- nosy: +LambertDW ___ Python tracker <http://bugs.python.org/issue5029> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue5032] itertools.count step

2009-01-22 Thread David W. Lambert
Changes by David W. Lambert : -- nosy: +LambertDW ___ Python tracker <http://bugs.python.org/issue5032> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue2527] Pass a namespace to timeit

2009-01-24 Thread David W. Lambert
David W. Lambert added the comment: This note is simply a reminder that Antoine's 'from __main__ import *' solution fails in python3. Also, resolution of this issue probably could incorporate Issue1397474. >>> import timeit >>> timeit.timeit('None'

[issue5044] name not found in generator in eval()

2009-01-24 Thread David W. Lambert
Changes by David W. Lambert : -- nosy: +LambertDW ___ Python tracker <http://bugs.python.org/issue5044> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue5061] Inadequate documentation of the built-in function open

2009-01-25 Thread David W. Lambert
David W. Lambert added the comment: I disagree. You propose to examine the trees but ignore the forest. The perspective programmer needs to understand what is a file. -- nosy: +LambertDW ___ Python tracker <http://bugs.python.org/issue5

[issue5061] Inadequate documentation of the built-in function open

2009-01-26 Thread David W. Lambert
David W. Lambert added the comment: (prospective, not perspective programmer) Spelling out the possibilities as suggested in Message80563 makes better sense to me than writing in words the logic handling the mode argument of the io.open function. (Perhaps there is a clearer implementation

[issue5032] itertools.count step

2009-01-26 Thread David W. Lambert
David W. Lambert added the comment: Nice. Now I know that $e$ is a least transcendental number. But I can't figure out why inserting this code into your file (and removing some "itertools.") is difficult or unreadable. I maintain a personal library of modules that I don&#x

[issue5032] itertools.count step

2009-01-26 Thread David W. Lambert
David W. Lambert added the comment: Probably a better prime factor algorithm uses Sieve of E. to generate primes through int(1+sqrt(n)) and test these. The other algorithm uses a custom generator anyway. Oh well, good luck, I'll shut up. You do have use cases that I couldn't think

[issue1397474] timeit execution enviroment

2009-01-27 Thread David W. Lambert
Changes by David W. Lambert : -- nosy: +LambertDW ___ Python tracker <http://bugs.python.org/issue1397474> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue4707] round(25, 1) should return an integer, not a float

2009-01-27 Thread David W. Lambert
David W. Lambert added the comment: I'd prefer round(x,positive_integer) return float. Returning int is a bit of a lie, except that the decimal module is available to avoid this sort of lie. For non-positive integer roundings I'd like an integer return. In my opinion, we'

[issue4707] round(25, 1) should return an integer, not a float

2009-01-27 Thread David W. Lambert
David W. Lambert added the comment: The value of one of the arguments controls how many digits there are. Certainly if you rounded $10 to the nearest cents you'd expect $10.00. Thus round(10,2) should be 10.00. Without using decimal module, the best we can do is produce 10.0. I'

[issue5092] weird memory usage in multiprocessing module

2009-01-28 Thread David W. Lambert
David W. Lambert added the comment: The del statement makes the variable local, as alluded to by http://docs.python.org/dev/3.0/reference/simple_stmts.html#the-del- statement The manual is clearer about assignments, which are local unless declared global or nonlocal. For other question, me

[issue5092] weird memory usage in multiprocessing module

2009-01-28 Thread David W. Lambert
David W. Lambert added the comment: My second answer is irrelevant. Function receives the global data as well as the arguments. ___ Python tracker <http://bugs.python.org/issue5

[issue5099] subprocess.POpen.__del__() AttributeError (os module == None!)

2009-01-29 Thread David W. Lambert
Changes by David W. Lambert : -- nosy: +LambertDW ___ Python tracker <http://bugs.python.org/issue5099> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue4174] Performance optimization for min() and max() over lists

2009-01-29 Thread David W. Lambert
Changes by David W. Lambert : ___ Python tracker <http://bugs.python.org/issue4174> ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/o

[issue4174] Performance optimization for min() and max() over lists

2009-01-29 Thread David W. Lambert
Changes by David W. Lambert : ___ Python tracker <http://bugs.python.org/issue4174> ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/o

[issue5092] weird memory usage in multiprocessing module

2009-01-30 Thread David W. Lambert
David W. Lambert added the comment: The alternative is unreasonable. I doubt you'd be happy with this: a = 'Something' def variable_both_global_and_local()->Exception('No good!'): del a# delete a from global name space a = 'anotherthing

[issue5109] array.array constructor very slow when passed an array object.

2009-01-30 Thread David W. Lambert
David W. Lambert added the comment: memcpy won't work if the data type changes. (possibly signed <-> unsigned same-byte-count works). -- nosy: +LambertDW ___ Python tracker <http://bugs.python

[issue5092] weird memory usage in multiprocessing module

2009-01-30 Thread David W. Lambert
David W. Lambert added the comment: #Ah! Not a problem. You need globals() and locals() dictionaries. # as a python3 script, this message produces next couple lines output. #method one #yup, global a is gone #method two #{'gv': 'local here', 'name': '

[issue5126] Space character returns false from isprintable() method

2009-02-01 Thread David W. Lambert
David W. Lambert added the comment: Python 3.0rc1+ (py3k, Nov 5 2008, 14:44:46) [GCC 3.4.6 20060404 (Red Hat 3.4.6-3)] on linux2 Type "help", "copyright", "credits" or "license" for more information. >>> ' '.

<    40   41   42   43   44   45   46   47   48   49   >