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
messag
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/
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:
...
Bruce Frederiksen <[EMAIL PROTECTED]> added the comment:
What you propose is not portable code. It won't work on jython or
ironpython or pypy because they don't have reference counting garbage
collectors that immediately reclaim objects.
Also I'm not asking that all c-b
New submission from Bruce Frederiksen <[EMAIL PROTECTED]>:
The python 3.0 Language Reference page describing compound_stmt
(http://docs.python.org/dev/3.0/reference/compound_stmts.html) includes
'decorated'. But the funcdef and classdef definitions both include
optional decor
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
--
assigne
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
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 a
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
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
New submission from Bruce Frederiksen :
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 pr
New submission from Bruce Frederiksen :
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 t
Bruce Frederiksen 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 out what the real
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/l
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
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:
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: 2
Bruce Frederiksen <[EMAIL PROTECTED]> added the comment:
OK, I see where I mis-diagnosed the problem. It seems that importing
smtplib (for example) shouldn't get confused with my email package. As
I understand it, using relative imports within a package should avoid
the problem of t
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
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
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 se
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 i
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
Bruce Frederiksen 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 environmen
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:
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 to
26 matches
Mail list logo