[issue13202] subprocess __exit__ attribute missing
New submission from David W. Lambert : 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',),shell=False,stdin=S.PIPE,stdout=S.PIPE,bufsize=1,universal_newlines=True) as p: p.stdin.write('these\n') print(p.stdout.readline()) Use: $ python3 p.py Traceback (most recent call last): File "p.py", line 5, in print(p.stdout.readline()) KeyboardInterrupt $ $ python p.py Traceback (most recent call last): File "p.py", line 3, in with S.Popen(('cat','-n',),shell=False,stdin=S.PIPE,stdout=S.PIPE,bufsize=1,universal_newlines=True) as p: AttributeError: __exit__ $ $ python Python 2.7.1+ (r271:86832, Apr 11 2011, 18:13:53) [GCC 4.5.2] on linux2 Type "help", "copyright", "credits" or "license" for more information. >>> -- components: Interpreter Core, Library (Lib) messages: 145707 nosy: LambertDW priority: normal severity: normal status: open title: subprocess __exit__ attribute missing versions: Python 2.7 ___ Python tracker <http://bugs.python.org/issue13202> ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue13484] mail rejected: tu...@python.org
New submission from David W. Lambert : 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: David Ward Lambert To: tu...@python.org Subject:tkinter question I have not been able to resolve. Date: Mon, 21 Nov 2011 22:15:23 -0500 http://forums.devshed.com/python-programming-11/setting-tkinter-checkbox-default-graphical-state-865148.html Summary: Trouble initiating button in "checked" state. If you answer to me, I'll post the answer at the devshed forum. If you answer at the forum I'll probably find it. Thank you, Dave Lambert also known as b49P23TIvg -- components: None messages: 148414 nosy: LambertDW priority: normal severity: normal status: open title: mail rejected: tu...@python.org ___ Python tracker <http://bugs.python.org/issue13484> ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue13485] tcl question
New submission from David W. Lambert : 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. If you answer to me, I'll post the answer at the devshed forum. If you answer at the forum I'll probably find it. I doubt this is a python bug. I doubt this is a tcl bug. I think the proper forum would be the "How do I use tcl?" forum. Sorry, I've posed the question here. Thank you, Dave Lambert also known as b49P23TIvg -- components: Library (Lib) messages: 148415 nosy: LambertDW priority: normal severity: normal status: open title: tcl question ___ Python tracker <http://bugs.python.org/issue13485> ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue3738] logging.Handler.close does something
New submission from David W. Lambert <[EMAIL PROTECTED]>: Library documents claim that logging.Handler.close does nothing, but the source code shows otherwise---it removes itself from the internal handler list. The error propagates treelike through the subclasses. (I found references to close in stream handler flush and NTEventLogHandler subclass). I have source code for version 2.5, but the error likely persists through version 3.03b which http://docs.python.org/dev/3.0/library/logging.html#logging.StreamHandl er claims, "flush()¶ Flushes the stream by calling its flush() method. Note that the close () method is inherited from Handler and so does nothing, so an explicit flush() call may be needed at times. " Actually, before reading the manual I tried del streamHandler_on_my_stream; my_stream.close() which didn't fix subsequent log messages that reported failure writing to closed stream. __del__ might be easy to implement, and it seems natural. Respectfully, Dave -- assignee: georg.brandl components: Documentation messages: 72191 nosy: LambertDW, georg.brandl severity: normal status: open title: logging.Handler.close does something versions: Python 2.5, Python 2.6, Python 2.7, Python 3.0 ___ Python tracker <[EMAIL PROTECTED]> <http://bugs.python.org/issue3738> ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue3993] Convert documentation to python 3.
New submission from David W. Lambert <[EMAIL PROTECTED]>: http://docs.python.org/dev/3.0/library/multiprocessing.html#module- multiprocessing uses "print" statement in pre-version 3 form. I can easily imagine that this and similar 2to3 bugs pervade the manual. (If I insisted on foolish consistency I'd point out also that the multiprocessing guidelines recommend joining all processes started, but that a few items later under "joining processes that use queues" hides the parenthetical remark "... (or simply remove the p.join() line).") At any rate, I'm looking forward to the 3.0 release. And I'm thrilled that the library modules seem to be evolving toward lumps that are commonly used together. -- assignee: georg.brandl components: Documentation messages: 74009 nosy: LambertDW, georg.brandl severity: normal status: open title: Convert documentation to python 3. versions: Python 3.0 ___ Python tracker <[EMAIL PROTECTED]> <http://bugs.python.org/issue3993> ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue4000] Additional 2to3 documentation updates
New submission from David W. Lambert <[EMAIL PROTECTED]>: http://docs.python.org/dev/3.0/howto/functional.html a) Refers to "print statement" in Introduction, b) Uses syntax no longer valid: def get_state ((city, state)): ''' alas and unfortunately argument grouping is no longer permitted ''' return state Thanks, that's all for tonight. -- assignee: georg.brandl components: Documentation messages: 74065 nosy: LambertDW, georg.brandl severity: normal status: open title: Additional 2to3 documentation updates versions: Python 3.0 ___ Python tracker <[EMAIL PROTECTED]> <http://bugs.python.org/issue4000> ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue4000] Additional 2to3 documentation updates
Changes by David W. Lambert <[EMAIL PROTECTED]>: ___ Python tracker <[EMAIL PROTECTED]> <http://bugs.python.org/issue4000> ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue4000] Additional 2to3 documentation updates
David W. Lambert <[EMAIL PROTECTED]> added the comment: http://docs.python.org/dev/3.0/library/reprlib.html Should read return eval(obj) return `obj` http://docs.python.org/dev/3.0/library/collections.html#id2 Relic decimal point in named tuple example. >>> for p in Point(3, 4), Point(14, 5/7.): ___ Python tracker <[EMAIL PROTECTED]> <http://bugs.python.org/issue4000> ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue4000] Additional 2to3 documentation updates
David W. Lambert <[EMAIL PROTECTED]> added the comment: http://docs.python.org/dev/3.0/reference/lexical_analysis.html#identifi ers-and-keywords Back quote "`" appears in the list of delimiters. I suspect it isn't one. ___ Python tracker <[EMAIL PROTECTED]> <http://bugs.python.org/issue4000> ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue4029] Documentation displays incorrectly in iexplore.
New submission from David W. Lambert <[EMAIL PROTECTED]>: I use IEXPLORE version 6.0.2900.2180.xpsp_sp2_gdr.-70227-2254CO without any known customizations and have observed 3 display problems. (And since I guess that the python html libraries generated the manuals, could these libraries be improved?) 1) The browser ties underscores together into an underline making them hard to count. 2) The horizontal position of the quick links depends on the browser window width. Very narrow and they hide themselves beyond the right window edge. Sufficiently wide and they fit into the left margin where they sensibly belong. At a comfortable reading width they overlap the text. See picture. 3) The "print" function heading displays incorrectly. Please view the attached picture. Backslashes seem to display correctly elsewhere in the various normal texts throughout the documents. Also the space character would be more obvious in a fixed width font. Thanks, Dave. -- assignee: georg.brandl components: Documentation files: linksCanOverlapText.bmp messages: 74251 nosy: LambertDW, georg.brandl severity: normal status: open title: Documentation displays incorrectly in iexplore. versions: Python 3.0 Added file: http://bugs.python.org/file11692/linksCanOverlapText.bmp ___ Python tracker <[EMAIL PROTECTED]> <http://bugs.python.org/issue4029> ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue4000] Additional 2to3 documentation updates
David W. Lambert <[EMAIL PROTECTED]> added the comment: http://docs.python.org/dev/3.0/library/reprlib.html Back ticks didn't become a part of my python repertoire. I suppose return repr(obj) # is correct replacement for return `obj` ___ Python tracker <[EMAIL PROTECTED]> <http://bugs.python.org/issue4000> ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue4029] Documentation displays incorrectly in iexplore.
David W. Lambert <[EMAIL PROTECTED]> added the comment: multiple underscores could be replaced by a gif. latex2html solves a bunch of font problems this way. I tried to dump IE but was warned it would break microsoft office, which I need for work. If you happen to know how to adjust the registry so that msoffice works with FF, I'd like to know, but it belongs not in the python bugs. ___ Python tracker <[EMAIL PROTECTED]> <http://bugs.python.org/issue4029> ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue1040026] os.times() is bogus
David W. Lambert <[EMAIL PROTECTED]> added the comment: I don't know what is "HZ", but if it's "hertz" then a division is necessary. total_clocks time = - clocks_per_second otherwise there's no hope. -- nosy: +LambertDW ___ Python tracker <[EMAIL PROTECTED]> <http://bugs.python.org/issue1040026> ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue4029] Documentation displays incorrectly in iexplore.
David W. Lambert <[EMAIL PROTECTED]> added the comment: I installed google chrome. The manual display is absolutely beautiful. Thanks for your good work! Proofreader Dave. ___ Python tracker <[EMAIL PROTECTED]> <http://bugs.python.org/issue4029> ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue7076] Documentation add note about SystemRandom
David W. Lambert 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 a nosy one has more information? -- nosy: +LambertDW ___ Python tracker <http://bugs.python.org/issue7076> ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue8217] typo unterlying
New submission from David W. Lambert : 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 system and sends it back to the user’s browser, which displays it (this is the response). This is roughly how the unterlying protocol, HTTP works. -- assignee: georg.brandl components: Documentation messages: 101610 nosy: LambertDW, georg.brandl severity: normal status: open title: typo unterlying versions: Python 3.1 ___ Python tracker <http://bugs.python.org/issue8217> ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue8218] typo currect
New submission from David W. Lambert : 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: Documentation messages: 101614 nosy: LambertDW, georg.brandl severity: normal status: open title: typo currect versions: Python 3.1 ___ Python tracker <http://bugs.python.org/issue8218> ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue8218] typo currect
David W. Lambert added the comment: In same file, "intermangled with Python” and it has a “Publisher” which destignates" intermingled? designates? Thanks, Dave. -- ___ Python tracker <http://bugs.python.org/issue8218> ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue8218] typo currect
David W. Lambert added the comment: "Another problem ist the basic concept" is -- ___ Python tracker <http://bugs.python.org/issue8218> ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue8218] typo currect
David W. Lambert added the comment: much easier as is is specially designed more easily and is especially designed -- ___ Python tracker <http://bugs.python.org/issue8218> ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue8218] typo currect
David W. Lambert added the comment: There is a number of middlewares are -- ___ Python tracker <http://bugs.python.org/issue8218> ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue8218] typo currect
David W. Lambert added the comment: you can rely an already existing rely on an -- ___ Python tracker <http://bugs.python.org/issue8218> ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue8218] typo currect
David W. Lambert 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. -- ___ Python tracker <http://bugs.python.org/issue8218> ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue8218] typo currect
David W. Lambert 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 added the comment: > > David, can you provide these changes as a unified diff against the subversion > trunk? > > -- > nosy: +loewis > > ___ > Python tracker > <http://bugs.python.org/issue8218> > ___ -- ___ Python tracker <http://bugs.python.org/issue8218> ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue5479] Add an easy way to provide total ordering now that __cmp__ is deprecated/gone
David W. Lambert 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 of the order) On Mon, 2010-04-05 at 19:46 +, Éric Araujo wrote: > Éric Araujo added the comment: > > Hello > > Small documentation question: Does the expression “total ordering” have > established usage in maths or computer science? Its meaning is not obvious to > the non-maths person that I am. > > Regards > > -- > > ___ > Python tracker > <http://bugs.python.org/issue5479> > ___ -- ___ Python tracker <http://bugs.python.org/issue5479> ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue8338] Outdated information
New submission from David W. Lambert : 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 "http.server.SimpleHTTPRequestHandler" or, of course, something entirely different. Thanks, Dave. -- assignee: georg.brandl components: Documentation files: multiprocessing_docs.patch keywords: patch messages: 102567 nosy: LambertDW, georg.brandl severity: normal status: open title: Outdated information versions: Python 3.1, Python 3.2, Python 3.3 Added file: http://bugs.python.org/file16807/multiprocessing_docs.patch ___ Python tracker <http://bugs.python.org/issue8338> ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue8341] sphinx bug?
New submission from David W. Lambert : 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__ == '__main__': p = Process(target=f, args=('bob',)) p.start() p.join() -- assignee: georg.brandl components: Documentation messages: 102583 nosy: LambertDW, georg.brandl severity: normal status: open title: sphinx bug? versions: Python 3.2 ___ Python tracker <http://bugs.python.org/issue8341> ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue1880] Generalize math.hypot function
New submission from David W. Lambert: Please generalize math.hypot. While I don't have a survey of python codes, it seems to me unlikely for this change to break existing programs. import math def hypot(*args): ''' Return the Euclidean vector length. >>> from math import hypot, sqrt >>> hypot(5,12)# traditional definition 13.0 >>> hypot() 0.0 >>> hypot(-6.25) 6.25 >>> hypot(1,1,1) == sqrt(3) # diagonal of unit box True ''' return math.sqrt(sum(arg*arg for arg in args)) I propose this version as closest to: >>> print sys.version 2.5.1 (r251:54863, Jan 4 2008, 17:15:14) [GCC 3.4.4 (cygming special, gdc 0.12, using dmd 0.125)] >>> print math.hypot.__doc__ hypot(x,y) Return the Euclidean distance, sqrt(x*x + y*y). Thanks, Dave. PS. I don't understand why python is so restrictive. Although hypot is in the math library, it could be written in EAFP style as def hypot(*args): return sum(arg*arg for arg in args)**0.5 Rather than review the entire python library for items to generalize, I'll accept that the resulting errors would confuse "the penguin on my tele". "hypot" crosses me most often. I've not yet needed a version in the complex domain, such as my second version. I typically fill my need for length with scipy.sqrt(scipy.dot(v,v)), only to realize that for the short vectors I use, standard python constructs always perform faster than scipy -- components: Library (Lib) messages: 61374 nosy: LambertDW severity: minor status: open title: Generalize math.hypot function type: rfe versions: Python 3.0 __ Tracker <[EMAIL PROTECTED]> <http://bugs.python.org/issue1880> __ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue2085] Syntax for property set method
New submission from David W. Lambert: # proposed syntax: # object.property = *args,**kwargs # python 3k could accept property setter with multiple arguments class c: def f(self,a,b,c): print a,b,c F=property(None,f) c().F=*'hi',**{'c':'third setter argument'} -- components: None messages: 62323 nosy: LambertDW severity: minor status: open title: Syntax for property set method type: rfe versions: Python 3.0 __ Tracker <[EMAIL PROTECTED]> <http://bugs.python.org/issue2085> __ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue4127] repr or reprlib?
New submission from David W. Lambert <[EMAIL PROTECTED]>: http://docs.python.org/dev/3.0/library/reprlib.html#module-reprlib names the module reprlib. However, the example at bottom of page uses: http://docs.python.org/dev/3.0/library/reprlib.html#subclassing-repr- objects import repr -- assignee: georg.brandl components: Documentation messages: 74790 nosy: LambertDW, georg.brandl severity: normal status: open title: repr or reprlib? versions: Python 3.0 ___ Python tracker <[EMAIL PROTECTED]> <http://bugs.python.org/issue4127> ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue4144] 3 tutorial documentation errors
New submission from David W. Lambert <[EMAIL PROTECTED]>: I ran doctests on the interactive session scripts from the tutorial. Aside from finding a doctest enhancement---but there are already so many doctest issues tracked---I found these discrepancies using online tutorial and Python 3.0rc1 (r30rc1:66499, Oct 17 2008, 13:11:34) -1--1--1--1--1--1--1--1--1--1--1--1--1--1--1--1--1--1--1--1--1-- "doesn't" --> "does not" Trite documentation error http://docs.python.org/dev/3.0/tutorial/introduction.html Time to fix the doctest EXCEPTION_DETAIL TypeError: 'str' object doesn't support ... (multiple occurrences) "doesn't" became "does not" in release 2.4. -2--2--2--2--2--2--2--2--2--2--2--2--2--2--2--2--2--2--2--2--2-- "coercing to Unicode" or "convert to str"? $ p3 Python 3.0rc1 (r30rc1:66499, Oct 17 2008, 13:11:34) [GCC 3.4.6 20060404 (Red Hat 3.4.6-3)] on linux2 Type "help", "copyright", "credits" or "license" for more information. >>> '2'+3 Traceback (most recent call last): File "", line 1, in TypeError: Can't convert 'int' object to str implicitly http://docs.python.org/dev/3.0/tutorial/errors.html >>> '2' + 2 Traceback (most recent call last): File "", line 1, in ? TypeError: coercing to Unicode: need string or buffer, int found -3--3--3--3--3--3--3--3--3--3--3--3--3--3--3--3--3--3--3--3--3-- Integer division yields float http://docs.python.org/dev/3.0/tutorial/errors.html >>> divide(2, 1)# 2.0 is correct result is 2 -doctest---doctest---doctest---doctest---doctest---doctest-- doctest improvement possible # execute this as sh code to exhibit problem cat<p.py ''' example from http://docs.python.org/dev/3.0/tutorial/introduction.html >>> 'doesn\'t' "doesn't" ''' import doctest doctest.testmod() EOF python p.py # "\"Yes,\" he said." # likewise breaks doctest # end of sh scripting I suppose these issues are known. Here's another that fails in doctest: http://docs.python.org/dev/3.0/tutorial/stdlib.html >>> re.findall(r'\bf[a-z]*', 'which foot or hand fell fastest') ['foot', 'fell', 'fastest'] -- messages: 74958 nosy: LambertDW severity: normal status: open title: 3 tutorial documentation errors versions: Python 3.0 ___ Python tracker <[EMAIL PROTECTED]> <http://bugs.python.org/issue4144> ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue4154] More doc trivia
New submission from David W. Lambert <[EMAIL PROTECTED]>: http://docs.python.org/dev/3.0/extending/extending.html Given that the following paragraph tells us that there should be just one non-static item in the module file, struct PyModuleDef spammodule = should be static struct PyModuleDef spammodule = Possibly this persists into the Demos, that's not available to me right now. Thanks! (perusal---might wish to write static void no_bug static void bug ) -- assignee: georg.brandl components: Documentation messages: 75001 nosy: LambertDW, georg.brandl severity: normal status: open title: More doc trivia versions: Python 3.0 ___ Python tracker <[EMAIL PROTECTED]> <http://bugs.python.org/issue4154> ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue4168] core dump exiting python
New submission from David W. Lambert <[EMAIL PROTECTED]>: I created in the python module gsl_fft a __del__ method to release workspace when the data size changes. It is called upon exiting python, and gave errors without traceback. So I registered it with atexit. This caused core dump. The attached tape archive has necessary modules, and file gdb.output. The latter contains, I hope, enough information to reconstruct the command line and even to find the cause. Additionally you'll need the gsl and gslcblas shared object libraries. -- components: Interpreter Core files: coredump.tar messages: 75064 nosy: LambertDW severity: normal status: open title: core dump exiting python type: crash versions: Python 3.0 Added file: http://bugs.python.org/file11854/coredump.tar ___ Python tracker <[EMAIL PROTECTED]> <http://bugs.python.org/issue4168> ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue4168] core dump exiting python
David W. Lambert <[EMAIL PROTECTED]> added the comment: I rebuilt python3k from "today's snapshot". No more core dump. Problem solved, close case. IMH'edO. ___ Python tracker <[EMAIL PROTECTED]> <http://bugs.python.org/issue4168> ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue4193] Multiprocessing example
New submission from David W. Lambert <[EMAIL PROTECTED]>: http://docs.python.org/dev/3.0/library/multiprocessing.html I'm sure the examples have been thoughtfully contrived. Still, this seems instructive without adding much complexity. I'd change the first "trivial example" to ### from multiprocessing import Process import os def info(title): print(title) print('module name:',__name__) print('parent process:',os.getppid()) print('process id:',os.getpid()) print() def f(name): info('function f') print('hello', name) if __name__ == '__main__': info('main line') p = Process(target=f, args=('bob',)) p.start() p.join() ### with output similar to main line module name: __main__ parent process: 12926 process id: 17002 function f module name: __main__ parent process: 17002 process id: 17004 hello bob -- assignee: georg.brandl components: Documentation messages: 75172 nosy: LambertDW, georg.brandl severity: normal status: open title: Multiprocessing example type: feature request versions: Python 3.0 ___ Python tracker <[EMAIL PROTECTED]> <http://bugs.python.org/issue4193> ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue4196] library documentation errors
New submission from David W. Lambert <[EMAIL PROTECTED]>: 4 problems noted here. Thanks, Dave. 1,2---problems 1 & 2 concern py<3k references: http://docs.python.org/dev/3.0/library/multiprocessing.html 1) "apply(func[, args[, kwds]]) Equivalent of the apply() builtin function. It blocks till the result is ready." Of course there isn't any longer an "apply" builtin. 2) "imap(func, iterable[, chunksize]) An equivalent of itertools.imap()." Likewise, there's no "itertools.imap". Perhaps use itertools.some_sort_of_truncating_wrapper(itertools.zip_longest(...))? This brings us to the itertools problem. 3,4---problems 3 & 4 concern "izip" in: http://docs.python.org/dev/3.0/library/itertools.html This mentions "izip_longest()", but there isn't an "izip_anything" in py3k itertools. Searching the page for the string "izip" produces two separate occurrences. izip_longest -> zip_longest but I don't know how to fix the other one. -- assignee: georg.brandl components: Documentation messages: 75176 nosy: LambertDW, georg.brandl severity: normal status: open title: library documentation errors versions: Python 3.0 ___ Python tracker <[EMAIL PROTECTED]> <http://bugs.python.org/issue4196> ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue4194] Miserable subprocess.Popen performance
David W. Lambert <[EMAIL PROTECTED]> added the comment: cygwin Python 2.5.1 (similar) time with os.popen : 0.43818802 time with subprocess.Popen : 0.36161035 linux python 2.4.2 (similar) time with os.popen : 0.0344939231873 time with subprocess.Popen : 0.0354421138763 linux python3K (both awful) time with os.popen : 0.715471029282 time with subprocess.Popen : 1.58627915382 -- nosy: +LambertDW ___ Python tracker <[EMAIL PROTECTED]> <http://bugs.python.org/issue4194> ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue4206] multiprocessing docs
New submission from David W. Lambert <[EMAIL PROTECTED]>: http://docs.python.org/dev/3.0/library/multiprocessing.html "map(func, iterable[, chunksize]) A parallel equivalent of the map() builtin function. It blocks till the result is ready." Not really, __builtins__.map returns a mapping object, Pool().map returns...a list? >>> print(multiprocessing.Pool().map.__doc__) # rather lame doc string! Equivalent of `map()` builtin -- assignee: georg.brandl components: Documentation messages: 75223 nosy: LambertDW, georg.brandl severity: normal status: open title: multiprocessing docs versions: Python 3.0 ___ Python tracker <[EMAIL PROTECTED]> <http://bugs.python.org/issue4206> ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue4226] Should 2to3 know that file type is gone?
New submission from David W. Lambert <[EMAIL PROTECTED]>: class c(file): pass 2to3 says no changes required. Might it possibly suggest a replacement for file class? Thanks, Dave. -- messages: 75310 nosy: LambertDW severity: normal status: open title: Should 2to3 know that file type is gone? ___ Python tracker <[EMAIL PROTECTED]> <http://bugs.python.org/issue4226> ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue4226] Should 2to3 know that file type is gone?
Changes by David W. Lambert <[EMAIL PROTECTED]>: -- components: +2to3 (2.x to 3.0 conversion tool) type: -> feature request versions: +Python 3.0 ___ Python tracker <[EMAIL PROTECTED]> <http://bugs.python.org/issue4226> ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue4226] Should 2to3 know that file type is gone?
David W. Lambert <[EMAIL PROTECTED]> added the comment: python3k and I are having difficulty with File class, which in a version 2 python release extended the file type with methods to read through a file until some condition is found. -- type: feature request -> crash Added file: http://bugs.python.org/file11904/coredump.tar.Z ___ Python tracker <[EMAIL PROTECTED]> <http://bugs.python.org/issue4226> ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue4231] print " should be print("
New submission from David W. Lambert <[EMAIL PROTECTED]>: http://docs.python.org/dev/3.0/reference/datamodel.html >>> class Meta(type): ...def __getattribute__(*args): ... print "Metaclass getattribute invoked" xxx ... print "Class getattribute invoked" perhaps there's a way to search all of the code examples in the new documents to fix most of these occurrences instead of finding them piecemeal? print(re.compile("print *[^(]").search(code_examples(all_dev_docs))) -- messages: 75326 nosy: LambertDW severity: normal status: open title: print "should be print(" ___ Python tracker <[EMAIL PROTECTED]> <http://bugs.python.org/issue4231> ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue4226] Should 2to3 know that file type is gone? Python core crashes with associated files.
David W. Lambert <[EMAIL PROTECTED]> added the comment: While trying to find a "file" replacement in the io library I managed to get py3k to crash. Please look at the file associated with the issue. Thanks, Dave. -- title: Should 2to3 know that file type is gone? -> Should 2to3 know that file type is gone? Python core crashes with associated files. ___ Python tracker <[EMAIL PROTECTED]> <http://bugs.python.org/issue4226> ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue4237] io.FileIO('foo', 'rt') prints a RuntimeWarning
Changes by David W. Lambert <[EMAIL PROTECTED]>: -- nosy: +LambertDW ___ Python tracker <[EMAIL PROTECTED]> <http://bugs.python.org/issue4237> ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue4237] io.FileIO('foo', 'rt') prints a RuntimeWarning
David W. Lambert <[EMAIL PROTECTED]> added the comment: >>> print(io.read.__doc__) ... The default mode is 'rt' (open for reading text). ... ___ Python tracker <[EMAIL PROTECTED]> <http://bugs.python.org/issue4237> ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue4243] has_key doc could be clearer
David W. Lambert <[EMAIL PROTECTED]> added the comment: The D'Arcy J.M. Cain wording is clearer. "dict.has_key(key) is deprecated. Use "key in dict" instead." would improve python. -- nosy: +LambertDW ___ Python tracker <[EMAIL PROTECTED]> <http://bugs.python.org/issue4243> ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue4247] Docs: Provide some examples of "pass" use in the tutorial.
David W. Lambert <[EMAIL PROTECTED]> added the comment: I'd change the exceptions, replace comment with string. Instead of raise NotImplementedError # Set up dummy log back-end write raise NotImplementedError('Set up dummy log back-end') -- nosy: +LambertDW ___ Python tracker <[EMAIL PROTECTED]> <http://bugs.python.org/issue4247> ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue4260] ctypes.xFUNCTYPE are decorators.
New submission from David W. Lambert <[EMAIL PROTECTED]>: http://docs.python.org/dev/3.0/library/ctypes.html#callback-functions ctypes.xFUNCTYPE are another opportunity to advertise decorators. Please consider inserting yet another qsort example written as a decorator, perhaps as follows. Or---it could be that I'm slow and the average pythonista will figure this out on first read. @CFUNCTYPE(c_int, POINTER(c_int), POINTER(c_int)) def py_cmp_func(*args): (a,b,) = (t[0] for t in args) print("py_cmp_func", a, b) return a-b qsort(ia,len(ia),sizeof(c_int),py_cmp_func) -- assignee: georg.brandl components: Documentation messages: 75515 nosy: LambertDW, georg.brandl severity: normal status: open title: ctypes.xFUNCTYPE are decorators. type: feature request versions: Python 3.0 ___ Python tracker <[EMAIL PROTECTED]> <http://bugs.python.org/issue4260> ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue4279] Module 'parser' fails to build
Changes by David W. Lambert <[EMAIL PROTECTED]>: -- nosy: +LambertDW ___ Python tracker <[EMAIL PROTECTED]> <http://bugs.python.org/issue4279> ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue4226] Python core crashes with associated files.
David W. Lambert <[EMAIL PROTECTED]> added the comment: This problem was repaired by the python3.0 rc1+ of November 5 trunk snapshot. I suggest retirement of Issue4226. ___ Python tracker <[EMAIL PROTECTED]> <http://bugs.python.org/issue4226> ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue4309] ctypes documentation
New submission from David W. Lambert <[EMAIL PROTECTED]>: ''' http://docs.python.org/dev/3.0/library/ctypes.html Where web page says >>> printf("An int %d, a double %f\n", 1234, c_double(3.14)) Integer 1234, double 3.141049 31 >>> should instead read >>> printf(c_char_p("An int %d, a double %f\n"), 1234, c_double(3.14)) An int 1234, a double 3.14 31 Although the intent of the message is clear, it is inexact with regard to "An int" and "a double". Core dump is bigger problem: Processor: Dual-Core AMD Opteron(tm) Processor 2218 Python: Python 3.0rc1+ (py3k, Nov 5 2008, 14:44:46) [GCC 3.4.6 20060404 (Red Hat 3.4.6-3)] on linux2 core dumps by segmentation fault for all the printf examples without specifying c_char_p("string"). ''' # this program succeeds from ctypes import * libc = CDLL("libc.so.6") print(libc.printf(c_char_p("An int %d, a double %f\n"), 1234, c_double(3.14))) -- assignee: georg.brandl components: Documentation messages: 75793 nosy: LambertDW, georg.brandl severity: normal status: open title: ctypes documentation type: crash versions: Python 3.0 ___ Python tracker <[EMAIL PROTECTED]> <http://bugs.python.org/issue4309> ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue4321] unintended syntax error with decorators, parenthesis, and dots?
David W. Lambert <[EMAIL PROTECTED]> added the comment: Guido gets to choose. Read PEP:318 Title: Decorators for Functions and Methods and "gut feeling" http://mail.python.org/pipermail/python-dev/2004-August/046711.html -- nosy: +LambertDW ___ Python tracker <[EMAIL PROTECTED]> <http://bugs.python.org/issue4321> ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue4309] ctypes documentation
David W. Lambert <[EMAIL PROTECTED]> added the comment: Conversely, if the documentation is correct then my ctypes is flawed. "None, integers, byte strings and unicode strings are the only native Python objects that can directly be used as parameters in these function calls. None is passed as a C NULL pointer, byte strings and unicode strings are passed as pointer to the memory block that contains their data (char * or wchar_t *). Python integers are passed as the platforms default C int type, their value is masked to fit into the C type." -- components: +ctypes -Documentation ___ Python tracker <[EMAIL PROTECTED]> <http://bugs.python.org/issue4309> ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue4309] ctypes documentation
David W. Lambert <[EMAIL PROTECTED]> added the comment: Changing the string to type byte 'Works' from ctypes import * libc = CDLL('libc.so.6') libc.printf(b'hello') ___ Python tracker <[EMAIL PROTECTED]> <http://bugs.python.org/issue4309> ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue4309] ctypes documentation
David W. Lambert <[EMAIL PROTECTED]> added the comment: When patching py3k/Doc/library/ctypes.rst or ctypes module tree please consider u"World!" produces a syntax error. These wide character formats produce unintelligible output: for n in range(3,6): code = 'utf_%s'%2**n print(code) printf(b"Hello, %S\n", 'world'.encode(code)) http://mail.python.org/pipermail/python-3000/2008-November/015315.html And that early in the doc this is probably meant to be a simple, somewhat complete example. ___ Python tracker <[EMAIL PROTECTED]> <http://bugs.python.org/issue4309> ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue4371] coerce gone---but not from docs
New submission from David W. Lambert <[EMAIL PROTECTED]>: http://docs.python.org/dev/3.0/glossary.html Scanning the glossary reveals... coercion The glossary needs rewritten to eliminate "coerce builtin". __future__ Uses example import division, I'd replace it but I don't know what the future holds. integer division obvious. view not defined in the glossary. Please consider adding this concept. -- messages: 76142 nosy: LambertDW severity: normal status: open title: coerce gone---but not from docs ___ Python tracker <[EMAIL PROTECTED]> <http://bugs.python.org/issue4371> ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue4371] coerce gone---but not from docs
Changes by David W. Lambert <[EMAIL PROTECTED]>: -- assignee: -> georg.brandl components: +Documentation nosy: +georg.brandl versions: +Python 3.0 ___ Python tracker <[EMAIL PROTECTED]> <http://bugs.python.org/issue4371> ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue4378] howto doc update
New submission from David W. Lambert <[EMAIL PROTECTED]>: http://docs.python.org/dev/3.0/howto/functional.html Gone: itertools.ifilter itertools.imap itertools.izip changed: itertools.ifilterfalse --> itertools.filterfalse strange? functools.reduce is described, but not with functools. The section requests comments be mailed directly to author. Done. -- assignee: georg.brandl components: Documentation messages: 76190 nosy: LambertDW, georg.brandl severity: normal status: open title: howto doc update versions: Python 3.0 ___ Python tracker <[EMAIL PROTECTED]> <http://bugs.python.org/issue4378> ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue4391] optparse: use proper gettext plurals forms
David W. Lambert <[EMAIL PROTECTED]> added the comment: And while at it, replace "usage" with "Use". "Usage" isn't a word. -- nosy: +LambertDW ___ Python tracker <[EMAIL PROTECTED]> <http://bugs.python.org/issue4391> ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue4399] "shard" appears where "shared" intended
New submission from David W. Lambert <[EMAIL PROTECTED]>: http://docs.python.org/dev/3.0/library/ctypes.html insert "e" into "shard". Errors have dissimilar importance. The manual is so good that this is the worst I can find today. -- assignee: georg.brandl components: Documentation messages: 76277 nosy: LambertDW, georg.brandl severity: normal status: open title: "shard" appears where "shared" intended versions: Python 3.0 ___ Python tracker <[EMAIL PROTECTED]> <http://bugs.python.org/issue4399> ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue4517] improve __getattribute__ documentation
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 comment that __getattribute__ is "Called unconditionally to implement attribute accesses for instances of the class" gave me hope that some combination of "meta" "super" and "sub" might let me access __getattribute__ for expression eval('obj + another_object') despite the special notes. I realize now the truth is that "__getattribute__ is NEVER accessible in pure python code when the code uses the syntax of a unary or binary operator such as a+b, ~a, len(a)." See most of the functions in this manual section. Also name hash, which doesn't find much explicit use but could well be the most used python functionality. Find a smooth way to replace my NEVER since code can obviously access __getattribute__ from the special function. Thank you, and great work! -- assignee: georg.brandl components: Documentation messages: 76867 nosy: LambertDW, georg.brandl severity: normal status: open title: improve __getattribute__ documentation type: feature request versions: Python 3.0 ___ Python tracker <[EMAIL PROTECTED]> <http://bugs.python.org/issue4517> ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue4517] improve __getattribute__ documentation
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: unsupported operand type(s) for +: 'c' and 'int' ___ Python tracker <[EMAIL PROTECTED]> <http://bugs.python.org/issue4517> ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue4518] broken link to python 3 doc on main doc page
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.python.org/issue4518> ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue4518] broken link to python 3 doc on main doc page
Changes by David W. Lambert <[EMAIL PROTECTED]>: -- nosy: -LambertDW ___ Python tracker <[EMAIL PROTECTED]> <http://bugs.python.org/issue4518> ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue4534] problem with str.join - should work with list input, error says requires 'str' object
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://bugs.python.org/issue4534> ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue4534] problem with str.join - should work with list input, error says requires 'str' object
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 strings in the sequence. The separator between elements is S. ___ Python tracker <[EMAIL PROTECTED]> <http://bugs.python.org/issue4534> ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue4541] Add str method for removing leading or trailing substrings
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 processor wars of the (19)80's. Python should indeed make it easy to express your algorithms. It does this through readable syntax, by providing container objects of all sorts, with malleable classes. It gives access to operating system and hardware. Python stays current with softwares of the day. But Python should remain small It's okay to write some code. Must regular expression syntax keep pace with that of perl? Probably, only because the expressions are directly cut and pasteable. Otherwise, the re language has for me exceeded in complexity that which can be had more simply with a divide and conquer approach. Is there a good reason to have the math module duplicate the functionality described in math.h? No. One needn't know the c language exists to program python. (Historically it was a great and obvious first access to math functions in python. We're years beyond that. Hence---generalize hypot. It's brain dead trapped in 2D!) Don't accept the challenge for a python vs. (for instance) ruby feature checklist. Python should stick to the sensible. -- nosy: +LambertDW ___ Python tracker <[EMAIL PROTECTED]> <http://bugs.python.org/issue4541> ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue4517] improve __getattribute__ documentation
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 __getattribute__() method even of the object’s metaclass:" 2) Please insert into the glossary a definition of "implicit special method lookup" that addresses the grammar or syntax that causes it considering monad and dyad use. Thank you. ___ Python tracker <[EMAIL PROTECTED]> <http://bugs.python.org/issue4517> ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue2899] Fixers find, rfind, etc in 'string' module
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 isn't a short cut. It does seem like 2to3 could assume that you write code with honorable intention, grace, and style and thereby offer a suggestive note. The string module is not an isolated case for such notices. I made a similar request to yours for "file" which is gone in version 3. Unfortunately, code as follows is probably frequent, so we aren't likely to get support for this feature. Maybe here is an opportunity for venture capital! def f(list): ''' argument should be a list. "list" in this scope no longer names __builtins__.list ''' -- nosy: +LambertDW ___ Python tracker <[EMAIL PROTECTED]> <http://bugs.python.org/issue2899> ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue4596] 2to3 does not fail as early as possible.
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) messages: 77327 nosy: LambertDW severity: normal status: open title: 2to3 does not fail as early as possible. type: performance ___ Python tracker <[EMAIL PROTECTED]> <http://bugs.python.org/issue4596> ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue2899] Fixers find, rfind, etc in 'string' module
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 there are no changes necessary?". ___ Python tracker <[EMAIL PROTECTED]> <http://bugs.python.org/issue2899> ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue4596] 2to3 does not fail as early as possible.
David W. Lambert <[EMAIL PROTECTED]> added the comment: Granted, this isn't the hottest issue circulating. ___ Python tracker <[EMAIL PROTECTED]> <http://bugs.python.org/issue4596> ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue4606] Passing 'None' if argtype is set to POINTER(...) doesn't always result in NULL
Changes by David W. Lambert <[EMAIL PROTECTED]>: -- nosy: +LambertDW ___ Python tracker <[EMAIL PROTECTED]> <http://bugs.python.org/issue4606> ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue4619] Invalid Behaviour When a Default Argument is a Mutable Object
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 you'd like an empty mutable defaults if you're not happy with other methods already described. -- nosy: +LambertDW ___ Python tracker <[EMAIL PROTECTED]> <http://bugs.python.org/issue4619> ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue4622] SequenceMatcher bug with long sequences
David W. Lambert <[EMAIL PROTECTED]> added the comment: Python 3.0rc1+ similar. -- nosy: +LambertDW versions: +Python 3.0 ___ Python tracker <[EMAIL PROTECTED]> <http://bugs.python.org/issue4622> ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue4634] 2to3 should fix "import HTMLParser"
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 common. -- nosy: +LambertDW ___ Python tracker <http://bugs.python.org/issue4634> ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue4640] optparse - dosn't distinguish between '--option' and '-option'
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.org/issue4640> ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue4649] Fix a+b to a + b
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(w)A w; #define V2(f) A f(a,w)A a,w; #define DO(n,x) {I i=0,_n=(n);for(;i<_n;++i){x;}} I *ma(n){R(I*)malloc(n*4);}mv(d,s,n)I *d,*s;{DO(n,d[i]=s[i]);} tr(r,d)I *d;{I z=1;DO(r,z=z*d[i]);R z;} A ga(t,r,d)I *d;{A z=(A)ma(5+tr(r,d));z->t=t,z->r=r,mv(z->d,d,r); R z;} V1(iota){I n=*w->p;A z=ga(0,1,&n);DO(n,z->p[i]=i);R z;} V2(plus){I r=w->r,*d=w->d,n=tr(r,d);A z=ga(0,r,d); DO(n,z->p[i]=a->p[i]+w->p[i]);R z;} V2(from){I r=w->r-1,*d=w->d+1,n=tr(r,d); A z=ga(w->t,r,d);mv(z->p,w->p+(n**a->p),n);R z;} V1(box){A z=ga(1,0,0);*z->p=(I)w;R z;} V2(cat){I an=tr(a->r,a->d),wn=tr(w->r,w->d),n=an+wn; A z=ga(w->t,1,&n);mv(z->p,a->p,an);mv(z->p+an,w->p,wn);R z;} V2(find){} V2(rsh){I r=a->r?*a->d:1,n=tr(r,a->p),wn=tr(w->r,w->d); A z=ga(w->t,r,a->p);mv(z->p,w->p,wn=n>wn?wn:n); if(n-=wn)mv(z->p+wn,z->p,n);R z;} V1(sha){A z=ga(0,1,&w->r);mv(z->p,w->d,w->r);R z;} V1(id){R w;}V1(size){A z=ga(0,0,0);*z->p=w->r?*w->d:1;R z;} pi(i){P("%d ",i);}nl(){P("\n");} pr(w)A w;{I r=w->r,*d=w->d,n=tr(r,d);DO(r,pi(d[i]));nl(); if(w->t)DO(n,P("< ");pr(w->p[i]))else DO(n,pi(w->p[i]));nl();} C vt[]="+{~<#,"; A(*vd[])()={0,plus,from,find,0,rsh,cat}, (*vm[])()={0,id,size,iota,box,sha,0}; I st[26]; qp(a){R a>='a'&&a<='z';}qv(a){R a<'a';} A ex(e)I *e;{I a=*e; if(qp(a)){if(e[1]=='=')R st[a-'a']=ex(e+2);a= st[ a-'a'];} R qv(a)?(*vm[a])(ex(e+1)):e[1]?(*vd[e[1]])(a,ex(e+2)):(A)a;} noun(c){A z;if(c<'0'||c>'9')R 0;z=ga(0,0,0);*z->p=c-'0';R z;} verb(c){I i=0;for(;vt[i];)if(vt[i++]==c)R i;R 0;} I *wd(s)C *s;{I a,n=strlen(s),*e=ma(n+1);C c; DO(n,e[i]=(a=noun(c=s[i]))?a:(a=verb(c))?a:c);e[n]=0;R e;} main(){C s[99];while(gets(s))pr(ex(wd(s)));} -- nosy: +LambertDW ___ Python tracker <http://bugs.python.org/issue4649> ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue4649] Fix a+b to a + b
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.org/issue4649> ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue4680] Queue class should include high-water mark
Changes by David W. Lambert : -- nosy: +LambertDW ___ Python tracker <http://bugs.python.org/issue4680> ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue4615] de-duping function in itertools
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/issue4615> ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue4760] cmp gone---What's new in 3.1
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: 78394 nosy: LambertDW, georg.brandl severity: normal status: open title: cmp gone---What's new in 3.1 versions: Python 3.1 ___ Python tracker <http://bugs.python.org/issue4760> ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue4794] garbage collector blocks and takes worst-case linear time wrt number of objects
Changes by David W. Lambert : -- nosy: +LambertDW ___ Python tracker <http://bugs.python.org/issue4794> ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue4816] Patch of itertools.{combinations, permutations} for empty combinations
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.org/issue4816> ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue4816] Patch of itertools.{combinations, permutations} for empty combinations
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 (required) is a non-negative integer, second element (optional) is a non-negative integer or Infinity, and third element (optional) is a nonzero integer. Out[4]= Permutations[{1, 2}, {-2}] ___ Python tracker <http://bugs.python.org/issue4816> ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue4816] Patch of itertools.{combinations, permutations} for empty combinations
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.org/issue4816> ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue4816] Patch of itertools.{combinations, permutations} for empty combinations
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 have a script that solved word JUMBLE puzzles with a mathematica | spell pipeline. Now I look up words using a sorted anagram dictionary. ___ Python tracker <http://bugs.python.org/issue4816> ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue4899] doctest should support fixtures
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 suitable. The sufficiently simple algorithms of my code have doc strings that are the complete test and explanation. For others I provide both docstring and unit tests. But with many I explain the arguments and output, possibly the algorithm in a doc string. Tests and use case examples reside in the module's unit test. I'm among the "Choose correct tool for the job. python comes with full tool bag." group. -- nosy: +LambertDW ___ Python tracker <http://bugs.python.org/issue4899> ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue4760] cmp gone documentations
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 gone documentations ___ Python tracker <http://bugs.python.org/issue4760> ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue4925] Improve error message of subprocess
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 <http://bugs.python.org/issue4925> ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue4925] Improve error message of subprocess
David W. Lambert added the comment: (Actual command stream includes chmod +x ./s.sh) ___ Python tracker <http://bugs.python.org/issue4925> ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue4899] doctest should support fixtures
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 provided setUp framework my doc string would look like this!"): def TpedIterator(handle): ''' Iterates on an TPed file handler. Returns Marker objects. Tped_stream = open('cricket.sequence','r') ti = TpedIterator(Tped_stream) for marker in ti: use(marker) ''' 2) (With the caveat that I am unfamilar with your project.) You should choose terminology appropriate for your project. A computer scientist would expect "file handle" to be an integer. What you call "handle" is clearly a "stream" object and therefore of uncommon name. Since the file objects are more likely to be from the computer sciences rather than the biological realm you should stick with "stream". 3) We agree, "Don't Repeat Yourself". The last two chunks of your file enable doctest. I'll guess that similar lines may be found repeated throughout your sources. Instead of internal support, write a single test script that provides external support. It would process named files with unittest, doctest.[, and customtests.] $ python -c 'import test' glob There may be a python library for this. I can't guide you easily because I built and use my own framework. Nor have I bothered to figure out how python runs its own installation tests. 4) Yes, unittest are quite appropriate for your project. When you move your docstring tests to unittests try to isolate the tests. For instance, the test you've shown couples the TpedIterator with the string representation of a Marker object. 5) Is your system really so simple that it's useful to run interactively? I may be out of touch but I script most of my codes and tests because I make so many errors and module changes. In other words, is your interactive docstring example a reasonable use case? ___ Python tracker <http://bugs.python.org/issue4899> ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue4899] doctest should support fixtures
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): ''' Illustrative code adapted from what is now your doctest ''' ... ___ Python tracker <http://bugs.python.org/issue4899> ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue4994] subprocess (Popen) doesn't works properly
Changes by David W. Lambert : -- nosy: +LambertDW ___ Python tracker <http://bugs.python.org/issue4994> ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue5028] tokenize.generate_tokens doesn't always return logical line
Changes by David W. Lambert : -- nosy: +LambertDW ___ Python tracker <http://bugs.python.org/issue5028> ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue5029] Odd slicing behaviour
Changes by David W. Lambert : -- nosy: +LambertDW ___ Python tracker <http://bugs.python.org/issue5029> ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue5032] itertools.count step
Changes by David W. Lambert : -- nosy: +LambertDW ___ Python tracker <http://bugs.python.org/issue5032> ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue2527] Pass a namespace to timeit
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','from __main__ import *') Traceback (most recent call last): File "", line 1, in File "/usr/local/lib/python3.0/timeit.py", line 227, in timeit return Timer(stmt, setup, timer).timeit(number) File "/usr/local/lib/python3.0/timeit.py", line 135, in __init__ code = compile(src, dummy_src_name, "exec") File "", line 2 SyntaxError: import * only allowed at module level -- nosy: +LambertDW ___ Python tracker <http://bugs.python.org/issue2527> ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue5044] name not found in generator in eval()
Changes by David W. Lambert : -- nosy: +LambertDW ___ Python tracker <http://bugs.python.org/issue5044> ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue5061] Inadequate documentation of the built-in function open
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/issue5061> ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com