[issue1174] new generator methods not documented in Library Reference

2007-09-17 Thread Bruce Frederiksen
New submission from Bruce Frederiksen: The 2.5 library documentation mentions the new GeneratorExit exception, but does not show Generator Types with the new 'send', 'throw', 'close' and '__del__' methods. -- components: Documentation messages: 55981 nosy: dangyogi severity: minor

[issue1173] yield expressions not documented in Language Reference

2007-09-17 Thread Bruce Frederiksen
Changes by Bruce Frederiksen: -- components: Documentation severity: minor status: open title: yield expressions not documented in Language Reference type: rfe versions: Python 2.5 __ Tracker [EMAIL PROTECTED] http://bugs.python.org/issue1173

[issue2410] absolute import doesn't work for standard python modules

2008-03-18 Thread Bruce Frederiksen
New submission from Bruce Frederiksen [EMAIL PROTECTED]: Try this to reproduce error: $ mkdir -p test/email $ cd test $ touch __init__.py email/__init__.py $ cat ! foo.py from __future__ import absolute_import import smtplib ! $ python import foo ... File /usr/lib/python2.6/smtplib.py, line

[issue2427] 2to3 should translate itertools.imap into generator expression, not list comprehension

2008-03-19 Thread Bruce Frederiksen
New submission from Bruce Frederiksen [EMAIL PROTECTED]: 2to3, svn rev 61623 translates itertools.imap(lambda x: ..., ...) into a list comprehension. This should be translated instead into a generator expression so that doing itertools.imap on infinite iterators still works

[issue2428] 2to3 deletes # comments before from __future__ import with_statement

2008-03-19 Thread Bruce Frederiksen
New submission from Bruce Frederiksen [EMAIL PROTECTED]: 2to3, svn rev 61623. To reproduce this error: $ cat ! foobar.py # line 1 # line 2 from __future__ import with_statement import sys ! $ 2to3 -w foobar.py RefactoringTool: Skipping implicit fixer: buffer RefactoringTool: Skipping

[issue2446] 2to3 translates import foobar to import .foobar rather than from . import foobar

2008-03-21 Thread Bruce Frederiksen
New submission from Bruce Frederiksen [EMAIL PROTECTED]: 2to3 svn rev 61696 translates import local_module into import .local_module which isn't legal syntax. Should be from . import local_module. -- assignee: collinwinter components: 2to3 (2.x to 3.0 conversion tool) messages: 64247

[issue8515] idle Run Module (F5) does not set __file__ variable

2010-06-11 Thread Bruce Frederiksen
Bruce Frederiksen dangy...@gmail.com added the comment: No, IDLE compiles the module (with the 'compile' built-in using the 'exec' option) and then does an 'exec' on the code (in PyShell.py). It has several lines of code that it runs before this exec to prepare the environment that the code

[issue3914] augop definition does not include //=

2008-09-19 Thread Bruce Frederiksen
New submission from Bruce Frederiksen [EMAIL PROTECTED]: The definition for 'augop' on the Simple Statements page of the Language Definition does not include //=. http://docs.python.org/dev/3.0/reference/simple_stmts.html#grammar-token-augop -- assignee: georg.brandl components

[issue3913] compound_stmt syntax includes 'decorated'

2008-09-19 Thread Bruce Frederiksen
Bruce Frederiksen [EMAIL PROTECTED] added the comment: But the real Grammar doesn't include decorators on funcdef and classdef, while the Language Reference document does. So the 'decorated' option is not needed in the Language Reference (and, indeed, doesn't even seem to be defined

[issue3913] compound_stmt syntax includes 'decorated'

2008-09-19 Thread Bruce Frederiksen
Bruce Frederiksen [EMAIL PROTECTED] added the comment: The grammar definitions in the Language Reference are _not_ just a straight copy of the Grammar. They have been reworked. (I don't know why, perhaps to make it easier to understand)? So the Grammar defines funcdef and classdef _without_

[issue3917] set_display definition allows empty '{' '}' in Language Definition

2008-09-20 Thread Bruce Frederiksen
New submission from Bruce Frederiksen [EMAIL PROTECTED]: The definition for set_display in the Language Definition allows for empty curly braces by enclosing expression_list | comprehension in brackets ('[', ']'). These brackets should be removed, as empty curly braces are a dict_display. http

[issue3923] 'genexpr_for' in definition of 'call' in Language Reference.

2008-09-21 Thread Bruce Frederiksen
New submission from Bruce Frederiksen [EMAIL PROTECTED]: The definition of 'call' in the Language Reference refers to 'genexpr_for' which doesn't exist. Either 'genexpr_for' should be changed to 'comp_for' or 'expression genexpr_for' should be changed to 'comprehension'. See the following

[issue8256] TypeError: bad argument type for built-in operation

2010-03-28 Thread Bruce Frederiksen
New submission from Bruce Frederiksen dangy...@gmail.com: I'm getting a TypeError: bad argument type for built-in operation on a print() with no arguments. This seems to be a problem in both 3.1 and 3.1.2 (haven't tried 3.1.1). I've narrowed the problem down in a very small demo program

[issue8515] idle Run Module (F5) does not set __file__ variable

2010-04-23 Thread Bruce Frederiksen
New submission from Bruce Frederiksen dangy...@gmail.com: The python CLI always sets the __file__ variable, whether run as: $ python foobar.py or $ python -m foobar or $ python import foobar # __file__ set in foobar module The idle program sets the __file__ variable properly when you do

[issue4806] Function calls taking a generator as star argument can mask TypeErrors in the generator

2010-05-03 Thread Bruce Frederiksen
Bruce Frederiksen dangy...@gmail.com added the comment: I have also hit this error. I went to report it but found it already entered (good news), but not resolved from nearly a year ago (bad news). The error masked another bug that I had in my program and it took me quite awhile to figure

[issue2597] python2.6 -3 should report list.sort(cmp) as DeprecationWarning

2008-04-08 Thread Bruce Frederiksen
New submission from Bruce Frederiksen [EMAIL PROTECTED]: this is not reported in 2.6a1. -- components: Interpreter Core messages: 65207 nosy: dangyogi severity: normal status: open title: python2.6 -3 should report list.sort(cmp) as DeprecationWarning type: feature request versions

[issue2598] { +(}.format(**{' +(': 44}) should produce ValueError: invalid identifier, ' +(' in format

2008-04-08 Thread Bruce Frederiksen
New submission from Bruce Frederiksen [EMAIL PROTECTED]: Format strings are documented to only allow identifiers or integers as the field_name, but allow almost anything. Python 3.0a3 -- components: Interpreter Core messages: 65209 nosy: dangyogi severity: normal status: open title

[issue2599] allow field_name in format strings to default to next positional argument (e.g., {})

2008-04-08 Thread Bruce Frederiksen
New submission from Bruce Frederiksen [EMAIL PROTECTED]: Being forced to number the arguments when using positional arguments in a format string is difficult to maintain. Adding an argument to the format string either requires renumbering all subsequent arguments, or using an out of sequence

[issue2598] { +(}.format(**{' +(': 44}) should produce ValueError: invalid identifier, ' +(' in format

2008-04-12 Thread Bruce Frederiksen
Bruce Frederiksen [EMAIL PROTECTED] added the comment: I was reading the 3.0 documentation: http://docs.python.org/dev/3.0/library/string.html#formatstrings which indicated that an identifier was required. I was unaware of the implementation note in the PEP. They only issue remaining

[issue3842] can't run close through itertools.chain on inner generator

2008-09-11 Thread Bruce Frederiksen
New submission from Bruce Frederiksen [EMAIL PROTECTED]: There is no way to get generators to clean up (run their 'finally' clause) when used as an inner iterable to chain: def gen(n): ... try: ... # do stuff yielding values ... finally: ... # clean up c

[issue17677] Invitation to connect on LinkedIn

2013-04-09 Thread Bruce Frederiksen
New submission from Bruce Frederiksen: LinkedIn Python, I'd like to add you to my professional network on LinkedIn. - Bruce Bruce Frederiksen Information Technology and Services Professional Tampa/St. Petersburg, Florida Area Confirm that you know Bruce Frederiksen: https

[issue25991] readline example eventually consumes all memory

2016-01-01 Thread Bruce Frederiksen
New submission from Bruce Frederiksen: The Example in the readline documentation (section 6.7 of the Library Reference) shows how to save your readline history in a file, and restore it each time you start Python. The problem with the Example is that it does not include a call

[issue29902] copy breaks staticmethod

2017-03-25 Thread Bruce Frederiksen
New submission from Bruce Frederiksen: Doing a copy on a staticmethod breaks it: Python 3.5.2 (default, Nov 17 2016, 17:05:23) [GCC 5.4.0 20160609] on linux Type "help", "copyright", "credits" or "license" for more information. >>> from copy i