[issue16608] subclass str fails

2012-12-04 Thread David W. Lambert
New submission from David W. Lambert: http://forums.devshed.com/newreply.php?do=newreplynoquote=1p=2838814 class c(tuple): ... def __init__(s,a,b): ... tuple.__init__(s,a) ... self.b = b ... c(tuple(),666) Traceback (most recent call last): File stdin, line 1, in module TypeError

[issue16608] immutable subclass constructor call error does not show subclass name

2012-12-04 Thread David W. Lambert
David W. Lambert added the comment: The apparent problem was that the constructing str with __init__ failed. I now recall that immutables take initial values in the __new__ method. Sorry! Otherwise, it was quite thoughtful for you to search for a problem. Dave

[issue16608] immutable subclass constructor call error does not show subclass name

2012-12-04 Thread David W. Lambert
David W. Lambert added the comment: Sorry again. You probably didn't follow the link I posted to see the problem origination. Which was Cannot subclass str. I generalized this to tuple. On Tue, 2012-12-04 at 20:08 +, R. David Murray wrote: R. David Murray added the comment: I have

[issue13484] mail rejected: tu...@python.org

2011-11-26 Thread David W. Lambert
New submission from David W. Lambert b49p23t...@stny.rr.com: I sent this question to tu...@python.org as advertised at http://mail.python.org/mailman/listinfo/tutor The message was returned, and we still need an answer to the question. I'll post it as a separate bug. Thank you, Dave. From

[issue13485] tcl question

2011-11-26 Thread David W. Lambert
New submission from David W. Lambert b49p23t...@stny.rr.com: I was unable to solve this question. http://forums.devshed.com/python-programming-11/setting-tkinter-checkbox-default-graphical-state-865148.html Summary: Trouble initiating button in checked state

[issue13202] subprocess __exit__ attribute missing

2011-10-17 Thread David W. Lambert
New submission from David W. Lambert b49p23t...@stny.rr.com: There are a number of issues with subprocess and __exit__ , 12494 status fixed among them. Program (which doesn't work as I had hoped, but that's not the issue): 'file p.py' import subprocess as S with S.Popen(('cat','-n

[issue8338] Outdated information

2010-04-07 Thread David W. Lambert
New submission from David W. Lambert b49p23t...@stny.rr.com: http://docs.python.org/py3k/library/multiprocessing.html Doc/library/multiprocessing.rst refers to SimpleHTTPServer.HttpServer. The patch changes this to SimpleHTTPRequestHandler although you may prefer

[issue8341] sphinx bug?

2010-04-07 Thread David W. Lambert
New submission from David W. Lambert b49p23t...@stny.rr.com: http://docs.python.org/py3k/library/multiprocessing.html Indentation is incorrect as displayed and copied from google chrome browser: from multiprocessing import Process def f(name): print('hello', name) if __name__

[issue5479] Add an easy way to provide total ordering now that __cmp__ is deprecated/gone

2010-04-05 Thread David W. Lambert
David W. Lambert b49p23t...@stny.rr.com added the comment: http://en.wikipedia.org/wiki/Total_order For pair of items from a set, (that's the total) if a = b and b = c then a = c (part of the order) if a = b and b = a then a compares the same as b, a == b, (the other part

[issue8218] typo currect

2010-03-24 Thread David W. Lambert
David W. Lambert b49p23t...@stny.rr.com added the comment: I apologize for the noise. Yes, I'll read the article carefully and provide changes as a unified diff against the subversion trunk. On Wed, 2010-03-24 at 08:20 +, Martin v. Löwis wrote: Martin v. Löwis mar...@v.loewis.de added

[issue8217] typo unterlying

2010-03-23 Thread David W. Lambert
New submission from David W. Lambert b49p23t...@stny.rr.com: http://docs.python.org/py3k/howto/webservers.html The low-level view When a user enters a web site, his browser makes a connection to the site’s webserver (this is called the request). The server looks up the file in the file

[issue8218] typo currect

2010-03-23 Thread David W. Lambert
New submission from David W. Lambert b49p23t...@stny.rr.com: http://docs.python.org/py3k/howto/webservers.html The path to the interpreter in the shebang (#!/usr/bin/env python) must be currect. Sorry man there are a great many distractions here. -- assignee: georg.brandl components

[issue8218] typo currect

2010-03-23 Thread David W. Lambert
David W. Lambert b49p23t...@stny.rr.com added the comment: In same file, intermangled with Python” and it has a “Publisher” which destignates intermingled? designates? Thanks, Dave. -- ___ Python tracker rep...@bugs.python.org http

[issue8218] typo currect

2010-03-23 Thread David W. Lambert
David W. Lambert b49p23t...@stny.rr.com added the comment: Another problem ist the basic concept is -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue8218

[issue8218] typo currect

2010-03-23 Thread David W. Lambert
David W. Lambert b49p23t...@stny.rr.com added the comment: much easier as is is specially designed more easily and is especially designed -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue8218

[issue8218] typo currect

2010-03-23 Thread David W. Lambert
David W. Lambert b49p23t...@stny.rr.com added the comment: There is a number of middlewares are -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue8218

[issue8218] typo currect

2010-03-23 Thread David W. Lambert
David W. Lambert b49p23t...@stny.rr.com added the comment: you can rely an already existing rely on an -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue8218

[issue8218] typo currect

2010-03-23 Thread David W. Lambert
David W. Lambert b49p23t...@stny.rr.com added the comment: There is an incredible number of frameworks s/is/are/ The majority of users is best s/is/are/ o work together as good as possible. s/good/well/ jects can be saven in a st s/saven/saved/ Thank you. I'm through for now

[issue7076] Documentation add note about SystemRandom

2010-01-22 Thread David W. Lambert
David W. Lambert b49p23t...@stny.rr.com added the comment: I recall an experience with a random file in /dev that was considerably slow after consuming its cache. I used it as a seeder. I've now got an ubuntu system for which /dev/urandom gives me a hundred million bytes quickly. Perhaps

[issue7480] trite documentation issue.

2009-12-11 Thread David W. Lambert
New submission from David W. Lambert b49p23t...@stny.rr.com: http://docs.python.org/dev/py3k/library/stdtypes.html#index-559 Proposal: remove last sentence from class.__bases__ The tuple of base classes of a class object. If there are no base classes, this will be an empty tuple. Reason

[issue7466] Segmentation fault after about 20 seconds on lenovo T500

2009-12-09 Thread David W. Lambert
New submission from David W. Lambert b49p23t...@stny.rr.com: ''' This brute [possibly a] solution to http://projecteuler.net/index.php?section=problemsid=159 causes segmentation fault. $ p3 # an AMD 64 bit build. Python 3.1.1 (r311:74480, Oct 2 2009, 12:29:57) [GCC

[issue7466] Segmentation fault after about 20 seconds on lenovo T500

2009-12-09 Thread David W. Lambert
David W. Lambert b49p23t...@stny.rr.com added the comment: Further isolation, following change removes segmentation fault: digital_roots = tuple(map(digital_root,factorization)) becomes digital_roots = [digital_root(factor) for factor in factorization

[issue7439] Bug or expected behavior? I cannot tell.

2009-12-05 Thread David W. Lambert
David W. Lambert b49p23t...@stny.rr.com added the comment: Thank you! A prime sieve variant is a better way to generate the generalized Hamming numbers I'm after, at least if the maximum is known ahead of time. Dave Lambert -- ___ Python tracker

[issue7439] Bug or expected behavior? I cannot tell.

2009-12-04 Thread David W. Lambert
New submission from David W. Lambert b49p23t...@stny.rr.com: Raymond Hettinger posted clever Hamming number generator, http://code.activestate.com/recipes/576961/ which I tried to modify. The function gives incorrect output when called as hamming_numbers(shorthand = True). It seemed reasonable

[issue7429] PrettyPrinter cannot print dicts with unsortable keys

2009-12-03 Thread David W. Lambert
David W. Lambert b49p23t...@stny.rr.com added the comment: I believe this issue was resolved---expect it in a future release. -- nosy: +LambertDW ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue7429

[issue7430] cmp still sends messages

2009-12-03 Thread David W. Lambert
New submission from David W. Lambert b49p23t...@stny.rr.com: ''' RuntimeError: maximum recursion depth exceeded in cmp Python 3.1.1 (r311:74480, Oct 2 2009, 12:29:57) [GCC 4.3.3] on linux2 ''' import itertools,pprint combos = itertools.combinations def connect(nodes,a,b

[issue3976] pprint._safe_repr is not general enough in one instance

2009-11-18 Thread David W. Lambert
Changes by David W. Lambert b49p23t...@stny.rr.com: -- nosy: +LambertDW ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue3976 ___ ___ Python-bugs

[issue7237] Syntax error with not

2009-10-29 Thread David W. Lambert
New submission from David W. Lambert b49p23t...@stny.rr.com: lambertdw$ p3 Python 3.1.1 (r311:74480, Oct 2 2009, 12:29:57) [GCC 4.3.3] on linux2 Type help, copyright, credits or license for more information. not 23 False not(231) False 1+not(231) File stdin, line 1 1+not(231

[issue7237] Syntax error with not

2009-10-29 Thread David W. Lambert
David W. Lambert b49p23t...@stny.rr.com added the comment: problem also exists in 2.6. It's a, in my humble opinion, release blocker. -- type: compile error - behavior ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue7237

[issue5540] file objects in python 3 tutorial

2009-03-23 Thread David W. Lambert
David W. Lambert lamber...@corning.com added the comment: File objects should not be discussed in the tutorial to emphasize that the file type is gone. File objects should be in the tutorial as a useful familiar concept. -- ___ Python tracker rep

[issue5539] open documentation unclear

2009-03-22 Thread David W. Lambert
New submission from David W. Lambert lamber...@corning.com: See thread http://groups.google.com/group/comp.lang.python/browse_thread/thread/85e c714aa6898d84# En Sun, 22 Mar 2009 19:12:13 -0300, Benjamin Peterson benja...@python.org escribió: Gabriel Genellina gagsl-py2 at yahoo.com.ar

[issue5540] file objects in python 3 tutorial

2009-03-22 Thread David W. Lambert
New submission from David W. Lambert lamber...@corning.com: http://docs.python.org/dev/py3k/tutorial/inputoutput.html#methods-of- file-objects Is it proper to discuss file objects in py3K? -- assignee: georg.brandl components: Documentation messages: 83991 nosy: LambertDW, georg.brandl

[issue5539] open documentation unclear

2009-03-22 Thread David W. Lambert
Changes by David W. Lambert lamber...@corning.com: -- assignee: - georg.brandl components: +Documentation nosy: +georg.brandl versions: +Python 3.0 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue5539

[issue5513] What's New should say VERY CLEARLY that the type file is gone

2009-03-20 Thread David W. Lambert
David W. Lambert lamber...@corning.com added the comment: My file class extends text files with seek or read through condition or pattern, providing an awk like pattern{action} task separation. If I allow a pre-existing stream into my constructor (subprocess.Popen my favorite) I still suffer

[issue5513] What's New should say VERY CLEARLY that the type file is gone

2009-03-19 Thread David W. Lambert
David W. Lambert lamber...@corning.com added the comment: # With py3Krc1 it took me days to figure out how to # replace my base class file. Granted, there were # issues with io module at the time. Following met # my need. import io class File(io.TextIOWrapper): '''Open a text file

[issue5513] What's New should say VERY CLEARLY that the type file is gone

2009-03-19 Thread David W. Lambert
David W. Lambert lamber...@corning.com added the comment: #OOPS! I forgot the subtlety. #I must also retain the stream #else it gets collected. #Nasty. import io class file(io.TextIOWrapper): '''condensing code for this list without test is a no no!''' def __init__(self,name

[issue1520662] support all of strftime(3)

2009-03-17 Thread David W. Lambert
David W. Lambert lamber...@corning.com added the comment: http://linux.die.net/man/3/strftime or this link may be in USA, if you care: http://www.manpagez.com/man/3/strftime/ -- nosy: +LambertDW ___ Python tracker rep...@bugs.python.org http

[issue1520662] support all of strftime(3)

2009-03-17 Thread David W. Lambert
David W. Lambert lamber...@corning.com added the comment: (with similar links for strpfime). These are reasons a patch may be worth while: x difficult to work around using ctypes module with c library. x help(strftime) advises the programmer to see the reference manual for formatting codes

[issue1520662] support all of strftime(3)

2009-03-17 Thread David W. Lambert
David W. Lambert lamber...@corning.com added the comment: (I have no clue where the servers are.) -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue1520662

[issue3565] array documentation, method names not 3.0 compliant

2009-03-15 Thread David W. Lambert
Changes by David W. Lambert lamber...@corning.com: -- nosy: +LambertDW ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue3565 ___ ___ Python-bugs-list

[issue2382] [Py3k] SyntaxError cursor shifted if multibyte character is in line.

2009-03-15 Thread David W. Lambert
David W. Lambert lamber...@corning.com added the comment: Resolution of this may be applicable to Issue3446 as well. center, ljust and rjust are inconsistent with unicode parameters -- nosy: +LambertDW ___ Python tracker rep...@bugs.python.org http

[issue5479] Add an easy way to provide total ordering now that __cmp__ is deprecated/gone

2009-03-12 Thread David W. Lambert
David W. Lambert lamber...@corning.com added the comment: That's the best version I recall seeing at activestate. Still, I'd deprecate and remove and = from mathematics. -- nosy: +LambertDW ___ Python tracker rep...@bugs.python.org http

[issue5479] Add an easy way to provide total ordering now that __cmp__ is deprecated/gone

2009-03-12 Thread David W. Lambert
David W. Lambert lamber...@corning.com added the comment: (As I recall) in python-dev mailing list Ray claimed he could clean up a cited active state recipe to address this issue. He succeeded to the extent I'm aware---he's the author of http://code.activestate.com/recipes/576685/. I haven't

[issue5476] datetime: timedelta(minutes = i) silently fails with numpy.int32 input

2009-03-11 Thread David W. Lambert
David W. Lambert lamber...@corning.com added the comment: With older versions of each timedelta rejects the data type. Maybe that's a good resolution? $ /usr/local/bin/python2.4 Python 2.4.2 (#2, Jul 7 2006, 10:20:47) [GCC 3.4.5 20051201 (Red Hat 3.4.5-2)] on linux2 Type help, copyright

[issue5416] str.replace does strange things when given a negative count

2009-03-04 Thread David W. Lambert
David W. Lambert lamber...@corning.com added the comment: I completely agree that this is a documentation issue. Also, or perhaps for foolish completeness, in http://docs.python.org/3.0/library/stdtypes.html we would point out that the following group of string methods also work for bytes

[issue5420] Queue deprecation warning patch

2009-03-04 Thread David W. Lambert
Changes by David W. Lambert lamber...@corning.com: -- nosy: +LambertDW ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue5420 ___ ___ Python-bugs-list

[issue1175686] add reload function to IDLE

2009-03-03 Thread David W. Lambert
David W. Lambert lamber...@corning.com added the comment: 0-kbk I avoid idle altogether and run python in emacs shell buffer. Switching windows usually involves mice. Mice are evil. emacs has gazillions of features. artist mode (oops, mice!) rectangular regions, registers, 25 (hundreds

[issue5382] Allow Python keywords as keyword arguments for functions.

2009-02-27 Thread David W. Lambert
David W. Lambert lamber...@corning.com added the comment: Use cases are easy to find. So easily found that there's probably a sound reason for reserved words. The proposal couples lexical analysis to the parser. # syntax error or name error? def f(): class return def f(class

[issue5382] Allow Python keywords as keyword arguments for functions.

2009-02-27 Thread David W. Lambert
David W. Lambert lamber...@corning.com added the comment: You can sneak them in thusly: def f(**kwargs): print(kwargs) f(**{'class':'sidebar'}) ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue5382

[issue4318] optparse: formatting of help text/descriptions

2009-02-26 Thread David W. Lambert
David W. Lambert lamber...@corning.com added the comment: I'd like textwrap option to preserve new lines. Actual case: I have a code that produces cryptograms meant to be printed and solved with paper and pencil. Standard format for cryptogram inserts space character between each character

[issue4318] optparse: formatting of help text/descriptions

2009-02-26 Thread David W. Lambert
David W. Lambert lamber...@corning.com added the comment: granted, this isn't terribly difficult: '\n'.join(textwrap.fill(line) for line in text.split('\n')) ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue4318

[issue5350] Modification to pairwise in itertools recipes

2009-02-23 Thread David W. Lambert
Changes by David W. Lambert lamber...@corning.com: -- nosy: +LambertDW ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue5350 ___ ___ Python-bugs-list

[issue5350] Modification to pairwise in itertools recipes

2009-02-23 Thread David W. Lambert
David W. Lambert lamber...@corning.com added the comment: Nice. I had thought of this a while ago but found counter example, probably using the empty iterator def f(): raise StopIteration yield I didn't realize next had optional argument

[issue5331] multiprocessing hangs when Pool used within Process

2009-02-20 Thread David W. Lambert
David W. Lambert lamber...@corning.com added the comment: Fails also on this system. $ p3 Python 3.0.1 (r301:69556, Feb 13 2009, 23:52:55) [GCC 3.4.6 20060404 (Red Hat 3.4.6-3)] on linux2 (...) # use both hangs (...) p.start() p.join() (hmm la do diii laaa...)^C Traceback (most recent

[issue5332] csv sniffer

2009-02-20 Thread David W. Lambert
New submission from David W. Lambert lamber...@corning.com: Following instructions in http://docs.python.org/dev/3.0/library/csv.html#module-csv I opened file in binary mode. This might be simply a documentation problem or it may run deeper. Text mode works on red hat linux system. Here's

[issue5295] turtle.py dicionary spelling patch

2009-02-17 Thread David W. Lambert
New submission from David W. Lambert lamber...@corning.com: x/lib/python3.0$ diff --unified turtle.py.bak turtle.py --- turtle.py.bak 2009-02-17 11:29:15.0 -0500 +++ turtle.py 2009-02-17 11:29:37.0 -0500 @@ -2265,7 +2265,7 @@ outline: positive number

[issue5237] Allow auto-numbered replacement fields in str.format() strings

2009-02-13 Thread David W. Lambert
David W. Lambert lamber...@corning.com added the comment: Answering first question msg81873. Without colon separator, this might be considered confusing: ( ... '{d}{s}{f}{f}'.format(3, 'foo', 3.14, 2.72), ... '{d}{s}{f}{f}'.format(d=3, s='foo', f=3.14) ... ) ('3foo3.142.72

[issue5247] Unhelpful error message with str.format()

2009-02-13 Thread David W. Lambert
Changes by David W. Lambert lamber...@corning.com: -- nosy: +LambertDW ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue5247 ___ ___ Python-bugs-list

[issue5032] itertools.count step

2009-02-12 Thread David W. Lambert
David W. Lambert lamber...@corning.com added the comment: I run my shells with low priority so I can sneak around and kill them. ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue5032

[issue5229] Documentation for super() neglects to say what super() actually does

2009-02-12 Thread David W. Lambert
Changes by David W. Lambert lamber...@corning.com: -- nosy: +LambertDW ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue5229 ___ ___ Python-bugs-list

[issue5237] Allow auto-numbered replacement fields in str.format() strings

2009-02-12 Thread David W. Lambert
David W. Lambert lamber...@corning.com added the comment: '{d}{s}{f}'.format(3, 'foo', 3.14) is possibly unclear, but is shorter than '{#d}{#s}{#f}'.format(...) -- nosy: +LambertDW ___ Python tracker rep...@bugs.python.org http://bugs.python.org

[issue5237] Allow auto-numbered replacement fields in str.format() strings

2009-02-12 Thread David W. Lambert
David W. Lambert lamber...@corning.com added the comment: I am net yet fluent in format method. I meant : where # appeared. Anyway, I think you need the colon. If from print('{0:9}'.format(33)) you make the argument number implicit and remove the colon you'd get print('{9}'.format(33

[issue5221] help related topic doesn't exist

2009-02-11 Thread David W. Lambert
New submission from David W. Lambert lamber...@corning.com: help function is not current, then again, neither is my python3. Possibly sequencemethods[12] are eradicated. $ p3 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

[issue5186] Reduce hash collisions for objects with no __hash__ method

2009-02-11 Thread David W. Lambert
David W. Lambert lamber...@corning.com added the comment: x |= x4 Are you (Ray) sure you didn't mean x ^= x4? -- nosy: +LambertDW ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue5186

[issue5192] Update log message formatting.

2009-02-09 Thread David W. Lambert
New submission from David W. Lambert lamber...@corning.com: Allow logger object log message creation methods using ''.format method. have: logger_object.info('%s','lazy is better') logger_object.debug('{0!s}'.format('wasted effort')) want: logger_object.debug('{0}','Lazy') Work'rounds

[issue5157] os.stat('foo') succeds if 'foo.exe' exists on cygwin

2009-02-05 Thread David W. Lambert
Changes by David W. Lambert lamber...@corning.com: -- nosy: +LambertDW ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue5157 ___ ___ Python-bugs-list

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

2009-02-01 Thread David W. Lambert
David W. Lambert lamber...@corning.com 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. ' '.isprintable() # probably no surprise: False import sys

[issue5092] weird memory usage in multiprocessing module

2009-01-30 Thread David W. Lambert
David W. Lambert lamber...@corning.com 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' # define a in local

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

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

[issue5092] weird memory usage in multiprocessing module

2009-01-30 Thread David W. Lambert
David W. Lambert lamber...@corning.com 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': 'gv'} #yup, global gv

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

2009-01-29 Thread David W. Lambert
Changes by David W. Lambert lamber...@corning.com: -- nosy: +LambertDW ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue5099 ___ ___ Python-bugs-list

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

2009-01-29 Thread David W. Lambert
Changes by David W. Lambert lamber...@corning.com: ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue4174 ___ ___ 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 lamber...@corning.com: ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue4174 ___ ___ Python-bugs-list mailing list Unsubscribe

[issue5092] weird memory usage in multiprocessing module

2009-01-28 Thread David W. Lambert
David W. Lambert lamber...@corning.com 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

[issue5092] weird memory usage in multiprocessing module

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

[issue1397474] timeit execution enviroment

2009-01-27 Thread David W. Lambert
Changes by David W. Lambert lamber...@corning.com: -- nosy: +LambertDW ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue1397474 ___ ___ Python-bugs

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

2009-01-27 Thread David W. Lambert
David W. Lambert lamber...@corning.com 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

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

2009-01-27 Thread David W. Lambert
David W. Lambert lamber...@corning.com 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

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

2009-01-26 Thread David W. Lambert
David W. Lambert lamber...@corning.com 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

[issue5032] itertools.count step

2009-01-26 Thread David W. Lambert
David W. Lambert lamber...@corning.com 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

[issue5032] itertools.count step

2009-01-26 Thread David W. Lambert
David W. Lambert lamber...@corning.com 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

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

2009-01-25 Thread David W. Lambert
David W. Lambert lamber...@corning.com 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 rep

[issue2527] Pass a namespace to timeit

2009-01-24 Thread David W. Lambert
David W. Lambert lamber...@corning.com 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','from __main__ import

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

2009-01-24 Thread David W. Lambert
Changes by David W. Lambert lamber...@corning.com: -- nosy: +LambertDW ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue5044 ___ ___ Python-bugs-list

[issue5032] itertools.count step

2009-01-22 Thread David W. Lambert
Changes by David W. Lambert lamber...@corning.com: -- nosy: +LambertDW ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue5032 ___ ___ Python-bugs-list

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

2009-01-21 Thread David W. Lambert
Changes by David W. Lambert lamber...@corning.com: -- nosy: +LambertDW ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue5028 ___ ___ Python-bugs-list

[issue5029] Odd slicing behaviour

2009-01-21 Thread David W. Lambert
Changes by David W. Lambert lamber...@corning.com: -- nosy: +LambertDW ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue5029 ___ ___ Python-bugs-list

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

2009-01-18 Thread David W. Lambert
Changes by David W. Lambert lamber...@corning.com: -- nosy: +LambertDW ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue4994 ___ ___ Python-bugs-list

[issue4899] doctest should support fixtures

2009-01-13 Thread David W. Lambert
David W. Lambert lamber...@corning.com 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

[issue4899] doctest should support fixtures

2009-01-13 Thread David W. Lambert
David W. Lambert lamber...@corning.com 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

[issue4925] Improve error message of subprocess

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

[issue4899] doctest should support fixtures

2009-01-09 Thread David W. Lambert
David W. Lambert lamber...@corning.com 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

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

2009-01-07 Thread David W. Lambert
David W. Lambert lamber...@corning.com 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 rep

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

2009-01-07 Thread David W. Lambert
David W. Lambert lamber...@corning.com 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

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

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

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

2009-01-07 Thread David W. Lambert
David W. Lambert lamber...@corning.com 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 have

[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 lamber...@corning.com: -- nosy: +LambertDW ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue4794 ___ ___ Python-bugs-list

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

2008-12-27 Thread David W. Lambert
New submission from David W. Lambert lamber...@corning.com: 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

[issue4615] de-duping function in itertools

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

[issue4680] Queue class should include high-water mark

2008-12-16 Thread David W. Lambert
Changes by David W. Lambert lamber...@corning.com: -- nosy: +LambertDW ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue4680 ___ ___ Python-bugs-list

  1   2   >