[issue3897] collections

2008-09-19 Thread Dieter Kadelka

Dieter Kadelka [EMAIL PROTECTED] added the comment:

Benjamin Peterson wrote:

Hello,
in Modules/Setup.dist line 179 you find
#collections collectionsmodule.c # Container types
I think this line has to be changed to
#_collections _collectionsmodule.c # Container types

___
Python tracker [EMAIL PROTECTED]
http://bugs.python.org/issue3897
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue3907] for line in file doesn't work for pipes

2008-09-19 Thread Amaury Forgeot d'Arc

Amaury Forgeot d'Arc [EMAIL PROTECTED] added the comment:

Python 2.6 and 3.0 come with a completely new I/O implementation, which
correctly handle pipes in this regard (I just tested).

http://docs.python.org/dev/library/io.html

With the 3.0 version, the built-in open() is an alias for io.open;
with 2.6, you have to use io.open() explicitely.

--
nosy: +amaury.forgeotdarc
resolution:  - works for me
status: open - closed

___
Python tracker [EMAIL PROTECTED]
http://bugs.python.org/issue3907
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue3819] urllib2 sends Basic auth across redirects

2008-09-19 Thread Senthil

Senthil [EMAIL PROTECTED] added the comment:

This is working as designed and Requestor has not supplied any further
information on why he thinks it a bug.

___
Python tracker [EMAIL PROTECTED]
http://bugs.python.org/issue3819
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue3609] does parse_header really belong in CGI module?

2008-09-19 Thread Senthil

Changes by Senthil [EMAIL PROTECTED]:


--
nosy: +orsenthil

___
Python tracker [EMAIL PROTECTED]
http://bugs.python.org/issue3609
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue3908] Strange heapq behavior on Python 3.0 when overriding __le__

2008-09-19 Thread Giampaolo Rodola'

New submission from Giampaolo Rodola' [EMAIL PROTECTED]:

import heapq

class foo:
def __init__(self):
self.timeout = 0
def __le__(self, other):
return self.timeout = other.timeout

heap = []
heapq.heappush(heap, foo())
heapq.heappush(heap, foo())


This code on Python 2.x works without problems, by using Python3.0-RC1
it raises the following exception:


heapq.heappush(heap, foo())
TypeError: unorderable types: foo()  foo()


Note that the previous 3.0 beta didn't have such problem.

--
components: Library (Lib)
messages: 73425
nosy: giampaolo.rodola
severity: normal
status: open
title: Strange heapq behavior on Python 3.0 when overriding __le__
versions: Python 3.0

___
Python tracker [EMAIL PROTECTED]
http://bugs.python.org/issue3908
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue3908] Strange heapq behavior on Python 3.0 when overriding __le__

2008-09-19 Thread Sascha Müller

Sascha Müller [EMAIL PROTECTED] added the comment:

heapq expects a _lt_ method, and the error doesn't occur when the _le_
method is changed to _lt. According to the SVN log, this was changed due
to consistency with lists.sort().

--
nosy: +einmaliger -giampaolo.rodola

___
Python tracker [EMAIL PROTECTED]
http://bugs.python.org/issue3908
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue3908] Strange heapq behavior on Python 3.0 when overriding __le__

2008-09-19 Thread Sascha Müller

Changes by Sascha Müller [EMAIL PROTECTED]:


--
nosy: +giampaolo.rodola

___
Python tracker [EMAIL PROTECTED]
http://bugs.python.org/issue3908
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue3905] subprocess failing in GUI applications on Windows

2008-09-19 Thread Jean-Michel Fauth

Jean-Michel Fauth [EMAIL PROTECTED] added the comment:

I do not really know if this is related to this, but I suspect yes.
On my w2k+sp4 box, swiss french, Python 3.0rc1, IDLE does not start or
more precisely it starts by opening the following message box:

Subprocess Startup Error
---
IDLE's subprocess didn't make connection.  Either IDLE can't start a
subprocess or personal firewall software is blocking the connection.

It is certainly neither a firewall issue, nor a tkinter issue (tkinter 
applications are working fine.)

No problem with the 3.0b2 realease, 3.0b3: not tested.

--
nosy: +jmfauth

___
Python tracker [EMAIL PROTECTED]
http://bugs.python.org/issue3905
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue3905] subprocess failing in GUI applications on Windows

2008-09-19 Thread Amaury Forgeot d'Arc

Amaury Forgeot d'Arc [EMAIL PROTECTED] added the comment:

jmfauth: please try to run idle from a command prompt:

 cd path_to_python3.0rc1
 python Lib/idlelib/idle.py

Do you see interesting output there?

--
nosy: +amaury.forgeotdarc

___
Python tracker [EMAIL PROTECTED]
http://bugs.python.org/issue3905
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue3887] Python 2.6 doesn't run after installation on amd64

2008-09-19 Thread Martin v. Löwis

Martin v. Löwis [EMAIL PROTECTED] added the comment:

You were right; the x86 version of the CRT was included. This is now
fixed in r66514 and r66515.

If you want to try it out, try

http://www.dcl.hpi.uni-potsdam.de/home/loewis/python-2.6rc2.amd64.msi
http://www.dcl.hpi.uni-potsdam.de/home/loewis/python-2.6rc2.amd64.msi.asc

--
resolution:  - fixed
status: open - closed

___
Python tracker [EMAIL PROTECTED]
http://bugs.python.org/issue3887
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue1424152] urllib/urllib2: HTTPS over (Squid) Proxy fails

2008-09-19 Thread jan matejek

Changes by jan matejek [EMAIL PROTECTED]:


--
nosy: +matejcik

___
Python tracker [EMAIL PROTECTED]
http://bugs.python.org/issue1424152
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue3909] Building PDF documentation from tex files

2008-09-19 Thread Winfried Plappert

New submission from Winfried Plappert [EMAIL PROTECTED]:

I try to build PDF documentation from current Python-2.6rc2 and Python-
3.0rc1 versions. I tried the process under Windows XP and also Linux 
(Ubuntu). The results are the same. The documentation is not built 
correctly, mostly the table of contents and always the index is missing. 
pdflatex always stops with the same error:

! Too many }'s.
l.122 }

Line 122 refers to the file sphinx.sty.

After stopping, I rerun pdflatex with the command R to completion. 
This run has been created via the 3.0rc1 files, based on WindowsXP.

I will include a log file from the pdflatex build process. The error is 
in line 364 of file tutorial.log. 

The pdflatex (WindowsXP) version is:
MiKTeX-pdfTeX 2.7.3147 (1.40.9) (MiKTeX 2.7)
Copyright (C) 1982 D. E. Knuth, (C) 1996-2006 Han The Thanh
TeX is a trademark of the American Mathematical Society.

In case you need more docu, please let me know.

Winfried

--
assignee: georg.brandl
components: Documentation
files: tutorial.zip
messages: 73430
nosy: georg.brandl, wplappert
severity: normal
status: open
title: Building PDF documentation from tex files
type: crash
versions: Python 2.5, Python 3.0
Added file: http://bugs.python.org/file11525/tutorial.zip

___
Python tracker [EMAIL PROTECTED]
http://bugs.python.org/issue3909
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue3909] Building PDF documentation from tex files

2008-09-19 Thread Winfried Plappert

Winfried Plappert [EMAIL PROTECTED] added the comment:

modified version info: 2.6, 3.0

--
versions: +Python 2.6 -Python 2.5

___
Python tracker [EMAIL PROTECTED]
http://bugs.python.org/issue3909
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue3908] Strange heapq behavior on Python 3.0 when overriding __le__

2008-09-19 Thread Raymond Hettinger

Raymond Hettinger [EMAIL PROTECTED] added the comment:

It's supposed to be that way.  In 2.6 we support both to help with 
transition. In 3.0, we've cleaned up and made the APIs consistent. Try to 
get in the habit of defining all six rich comparisons to bulletproof code 
and not rely on undocumented implementation details.

--
assignee:  - rhettinger
nosy: +rhettinger
resolution:  - invalid
status: open - closed

___
Python tracker [EMAIL PROTECTED]
http://bugs.python.org/issue3908
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue3905] subprocess failing in GUI applications on Windows

2008-09-19 Thread Jean-Michel Fauth

Jean-Michel Fauth [EMAIL PROTECTED] added the comment:

Microsoft Windows 2000 [Version 5.00.2195]
(C) Copyright 1985-2000 Microsoft Corp.

C:\cd python30

C:\Python30python Lib/idlelib/idle.py
Traceback (most recent call last):
  File string, line 1, in module
  File C:\Python30\lib\idlelib\run.py, line 76, in main
sockthread.set_daemon(True)
AttributeError: 'Thread' object has no attribute 'set_daemon'

C:\Python30

Sorry if I can help here, things like socket and subprocess are not my
cup of tea.

___
Python tracker [EMAIL PROTECTED]
http://bugs.python.org/issue3905
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue3910] 2.6 regression in socket.ssl method

2008-09-19 Thread jan matejek

New submission from jan matejek [EMAIL PROTECTED]:

python 2.6's compatibility socket.ssl() method does not handle 'sock'
parameter in the same way.

in 2.5, ssl() looked like this:

def ssl(sock, keyfile=None, certfile=None):
if hasattr(sock, _sock):
sock = sock._sock
return _realssl(sock, keyfile, certfile)

in 2.6 the call is handed to ssl.sslwrap_simple, which then blindly does
_ssl.sslwrap(sock._sock, 0, keyfile, certfile, CERT_NONE,
PROTOCOL_SSLv23, None)
instead of checking whether the sock is the socket itself or the socket
object.
This causes code that passes the socket directly to fail with
AttributeError: '_socket.socket' object has no attribute '_sock'


the attached patch fixes the behavior.

--
components: Library (Lib)
files: bug-sslwrap-simple.patch
keywords: patch
messages: 73434
nosy: matejcik
severity: normal
status: open
title: 2.6 regression in socket.ssl method
type: behavior
versions: Python 2.6
Added file: http://bugs.python.org/file11526/bug-sslwrap-simple.patch

___
Python tracker [EMAIL PROTECTED]
http://bugs.python.org/issue3910
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue3887] Python 2.6 doesn't run after installation on amd64

2008-09-19 Thread John Ehresman

John Ehresman [EMAIL PROTECTED] added the comment:

The new installer works for both for everyone and for me installs.

Thanks,

John

___
Python tracker [EMAIL PROTECTED]
http://bugs.python.org/issue3887
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue3910] 2.6 regression in socket.ssl method

2008-09-19 Thread Bill Janssen

Bill Janssen [EMAIL PROTECTED] added the comment:

Looks OK to me.  I think this is a back-port problem from 3.0.

I'll put it in if no one objects.

--
assignee:  - janssen

___
Python tracker [EMAIL PROTECTED]
http://bugs.python.org/issue3910
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue3770] test_multiprocessing fails on systems with HAVE_SEM_OPEN=0

2008-09-19 Thread Damien Miller

Damien Miller [EMAIL PROTECTED] added the comment:

So the bug is actually in the multiprocessing module rather than the
unittest. If HAVE_SEM_OPEN is not defined then SemLock is never
built into _multiprocessing.so, but multiprocessing/syncronize.py
unconditionally depends on its presence.

I guess _multiprocessing could always define a dummy SemLock or
synchronize.py could check before it depends on it.

(it would be great to see this fixed for 2.6)

-d

___
Python tracker [EMAIL PROTECTED]
http://bugs.python.org/issue3770
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue3899] test_ssl.py doesn't properly test ssl integration with asyncore

2008-09-19 Thread Bill Janssen

Bill Janssen [EMAIL PROTECTED] added the comment:

Sure, no argument.  I was just making clear what was going on.

Bill

On Thu, Sep 18, 2008 at 7:33 PM, Josiah Carlson [EMAIL PROTECTED]wrote:


 Josiah Carlson [EMAIL PROTECTED] added the comment:

 Being able to test the async features of both sides of the SSL
 connection is a good thing.

 Also, the subclass provides a useful example for users who want to use
 asyncore and ssl servers without blocking on an incoming connection.

 ___
 Python tracker [EMAIL PROTECTED]
 http://bugs.python.org/issue3899
 ___


Added file: http://bugs.python.org/file11528/unnamed

___
Python tracker [EMAIL PROTECTED]
http://bugs.python.org/issue3899
___div dir=ltrSure, no argument.nbsp; I was just making clear what was going 
on.brbrBillbrbrdiv class=gmail_quoteOn Thu, Sep 18, 2008 at 7:33 
PM, Josiah Carlson span dir=ltrlt;a href=mailto:[EMAIL 
PROTECTED][EMAIL PROTECTED]/agt;/span wrote:br
blockquote class=gmail_quote style=border-left: 1px solid rgb(204, 204, 
204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;br
Josiah Carlson lt;a href=mailto:[EMAIL PROTECTED][EMAIL PROTECTED]/agt; 
added the comment:br
br
Being able to test the async features of both sides of the SSLbr
connection is a good thing.br
br
Also, the subclass provides a useful example for users who want to usebr
asyncore and ssl servers without blocking on an incoming connection.br
divdiv/divdiv class=Wj3C7cbr
___br
Python tracker lt;a href=mailto:[EMAIL PROTECTED][EMAIL 
PROTECTED]/agt;br
lt;a href=http://bugs.python.org/issue3899; 
target=_blankhttp://bugs.python.org/issue3899/agt;br
___br
/div/div/blockquote/divbr/div
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue3770] test_multiprocessing fails on systems with HAVE_SEM_OPEN=0

2008-09-19 Thread Jesse Noller

Jesse Noller [EMAIL PROTECTED] added the comment:

Bumping up _ I'll need help with a patch

--
priority:  - release blocker

___
Python tracker [EMAIL PROTECTED]
http://bugs.python.org/issue3770
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue3628] IDLE does not run with Py30b3

2008-09-19 Thread Benjamin Peterson

Benjamin Peterson [EMAIL PROTECTED] added the comment:

Fixed in r66518.

--
nosy: +benjamin.peterson
resolution:  - fixed
status: open - closed

___
Python tracker [EMAIL PROTECTED]
http://bugs.python.org/issue3628
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue3838] test_tarfile error on cygwin (Directory not empty)

2008-09-19 Thread Hirokazu Yamamoto

Changes by Hirokazu Yamamoto [EMAIL PROTECTED]:


--
keywords: +needs review

___
Python tracker [EMAIL PROTECTED]
http://bugs.python.org/issue3838
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue3911] ftplib.FTP.makeport() bug

2008-09-19 Thread Benjamin Peterson

Benjamin Peterson [EMAIL PROTECTED] added the comment:

Why not just use floor divide (//)?

--
nosy: +benjamin.peterson

___
Python tracker [EMAIL PROTECTED]
http://bugs.python.org/issue3911
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue3911] ftplib.FTP.makeport() bug

2008-09-19 Thread Giampaolo Rodola'

Giampaolo Rodola' [EMAIL PROTECTED] added the comment:

At your discretion. I was thinking that it's not encouraging that such
an outstanding bug has passed silently until RC1. IMHO, a minimal test
suite for the ftplib module would be really necessary.

A dummy FTP server returning fixed response codes could be arranged and
used to test the basic FTP class methods.

___
Python tracker [EMAIL PROTECTED]
http://bugs.python.org/issue3911
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue3911] ftplib.FTP.makeport() bug

2008-09-19 Thread Benjamin Peterson

Benjamin Peterson [EMAIL PROTECTED] added the comment:

On Fri, Sep 19, 2008 at 6:23 PM, Giampaolo Rodola'
[EMAIL PROTECTED] wrote:

 Giampaolo Rodola' [EMAIL PROTECTED] added the comment:

 At your discretion. I was thinking that it's not encouraging that such
 an outstanding bug has passed silently until RC1. IMHO, a minimal test
 suite for the ftplib module would be really necessary.

Yes, testing of some of these modules is quite sad.


 A dummy FTP server returning fixed response codes could be arranged and
 used to test the basic FTP class methods.

Would you like to contribute a patch?

 ___
 Python tracker [EMAIL PROTECTED]
 http://bugs.python.org/issue3911
 ___


___
Python tracker [EMAIL PROTECTED]
http://bugs.python.org/issue3911
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue3912] unittest. assertAlmostEqual() documentation incomplete

2008-09-19 Thread Roy Smith

New submission from Roy Smith [EMAIL PROTECTED]:

The third argument, places, is optional, but no indication is given what 
value is used if it is omitted.

--
assignee: georg.brandl
components: Documentation
messages: 73447
nosy: georg.brandl, roysmith
severity: normal
status: open
title: unittest. assertAlmostEqual() documentation incomplete
versions: Python 2.5

___
Python tracker [EMAIL PROTECTED]
http://bugs.python.org/issue3912
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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: Documentation
messages: 73449
nosy: dangyogi, georg.brandl
severity: normal
status: open
title: augop definition does not include //=
versions: Python 3.0

___
Python tracker [EMAIL PROTECTED]
http://bugs.python.org/issue3914
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue3913] compound_stmt syntax includes 'decorated'

2008-09-19 Thread Benjamin Peterson

Benjamin Peterson [EMAIL PROTECTED] added the comment:

If you look at the real Grammar (in Grammar/Grammar), you will see that
this decorated is used in the grammar.

--
nosy: +benjamin.peterson
resolution:  - invalid
status: open - closed

___
Python tracker [EMAIL PROTECTED]
http://bugs.python.org/issue3913
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue3851] IDLE: Pressing Home on Windows places cursor before instead of after. Solution offered.

2008-09-19 Thread Terry J. Reedy

Terry J. Reedy [EMAIL PROTECTED] added the comment:

This is supposed to have been fixed by
http://bugs.python.org/issue1196903
but I don't believe there has not been a 2.5 release since then.
I do not know if that patch was or was backported for 2.5.

--
nosy: +tjreedy

___
Python tracker [EMAIL PROTECTED]
http://bugs.python.org/issue3851
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue3892] bsddb: test01_basic_replication fails on Windows sometimes

2008-09-19 Thread Mark Hammond

Mark Hammond [EMAIL PROTECTED] added the comment:

Actually, I've decided to leave it alone.  The buildbots most recent
failure was:

test test_bsddb3 failed -- Traceback (most recent call last):
  File
S:\buildbots\python\trunk.nelson-windows\build\lib\bsddb\test\test_replication.py,
line 315, in test01_basic_replication
self.assertTrue(time.time()timeout)
AssertionError

But I can't repro that - instead, I now see:

Traceback (most recent call last):
  File o:\src\python-svn\lib\bsddb\test\test_lock.py, line 127, in
test03_lock_timeout
self.assertTrue((end_time-start_time) = 0.1)
AssertionError

So I go back to the windows buildbots and they are all green!!  So any
remaining issues appear truly transient and don't seem to be restricted
to a single place.  I can't think of an obvious improvement to make here.

___
Python tracker [EMAIL PROTECTED]
http://bugs.python.org/issue3892
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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 there).

Benjamin Peterson wrote:
 Benjamin Peterson [EMAIL PROTECTED] added the comment:

 If you look at the real Grammar (in Grammar/Grammar), you will see that
 this decorated is used in the grammar.

 --
 nosy: +benjamin.peterson
 resolution:  - invalid
 status: open - closed

 ___
 Python tracker [EMAIL PROTECTED]
 http://bugs.python.org/issue3913
 ___



___
Python tracker [EMAIL PROTECTED]
http://bugs.python.org/issue3913
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue3913] compound_stmt syntax includes 'decorated'

2008-09-19 Thread Benjamin Peterson

Benjamin Peterson [EMAIL PROTECTED] added the comment:

The language reference is merely a explanation of the the Grammar, so I
don't understand why you think it shouldn't be there. A 'decorated' node
contains a 'classdef' or 'fundef'.

___
Python tracker [EMAIL PROTECTED]
http://bugs.python.org/issue3913
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue3891] collections.deque should have empty() method

2008-09-19 Thread Terry J. Reedy

Terry J. Reedy [EMAIL PROTECTED] added the comment:

I changed this to a doc issue for 2.6/3.0 whenever.

I have two objections to adding An empty deque evaluates as false. 
First, it implies (falsely) that it could be otherwise; since deque has
no __bool__ method, its __len__ method is used, so that bool(d) ==
(len(d)!=0).   Second, it misses better doc enhancements that might make
the statement I just made clearer and easier to find.

1. Ref manual Expressions Boolean Operations says
In the context of Boolean operations, and also when expressions are
used by control flow statements, the following values are interpreted as
false: False, None, numeric zero of all types, and empty strings and
containers (including strings, tuples, lists, dictionaries, sets and
frozensets).

For 3.0, I suggest replacing and empty strings... with
empty strings and sequences (including strings, bytes, bytearrays,
tuples, lists, and Userlists and deques from the collections module),
and other empty containers (sets, frozensets, dictionaries, and
Userdicts and defaultdicts from the collections module).
Anything else I forgot?  Adjust for 2.5/6.

The sentence after next User-defined objects can customize their truth
value by providing a __bool__() method. should say '... __bool__ or
__len__ method.', with __len__ linked to object.__len__ just as __bool__
is linked to object.__bool__.

2. The LibRef entry for built-in function bool says simply Convert a
value to a Boolean, using the standard truth testing procedure. 
Extended that with  described in the Language reference in the __bool__
and __len__ entries of the Special methods subsection and in the Boolean
operations subsection.

--
assignee: rhettinger - georg.brandl
components: +Documentation -Extension Modules, Library (Lib)
nosy: +georg.brandl, tjreedy
versions: +Python 2.6, Python 3.0 -Python 2.7, Python 3.1

___
Python tracker [EMAIL PROTECTED]
http://bugs.python.org/issue3891
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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_ decorators and 
then has a separate definition for decorated funcdefs and classdefs 
called 'decorated' that is another compound_stmt (along with funcdef and 
classdef).  (For Grammar, I'm looking at: 
http://docs.python.org/dev/3.0/reference/grammar.html).

The Language Reference defines both funcdef and classdef _with_ optional 
decorators, so the 'decorated' alternative for compound_stmt is no 
longer required and should be deleted.  The following links should take 
you straight to the funcdef and classdef definitions in the Language 
Reference:

http://docs.python.org/dev/3.0/reference/compound_stmts.html#grammar-token-funcdef
http://docs.python.org/dev/3.0/reference/compound_stmts.html#grammar-token-classdef

Now, I just also noticed that the Language Reference actually has two 
definitions of funcdef.  The second definition is 3 lines below the 
first one and fails to include either the optional decorators or the new 
[- expression] option after the argument list.  Should I report this 
as another bug, or does this comment count.  This second definition 
should be deleted.

Also, the first definition of funcdef in the Language Reference has an 
extraneous '?' character after the [- expression] which should also 
be deleted.  Should I report this as a separate bug too, or leave it, as 
well, to this comment?  (Sorry for asking whether to report these too, I 
don't know how strict you guys are about keeping a record of everything).

There are many other places where the grammar defined in the Language 
Reference is not a mirror copy of the Grammar (but is still an 
equivalent grammar).  In fact, this seems to be the rule, rather than 
the exception.  If you are unaware of this, you should examine the 
grammar definitions in the Language Reference and compare them to the 
Grammar yourself; or ask whoever is in charge of the Language Reference 
document.  I don't know why this was done, I'm just trying to point out 
that the Language Reference document has some (minor) bugs in it that 
are very easily fixed.

Benjamin Peterson wrote:
 Benjamin Peterson [EMAIL PROTECTED] added the comment:

 The language reference is merely a explanation of the the Grammar, so I
 don't understand why you think it shouldn't be there. A 'decorated' node
 contains a 'classdef' or 'fundef'.

 ___
 Python tracker [EMAIL PROTECTED]
 http://bugs.python.org/issue3913
 ___



___
Python tracker [EMAIL PROTECTED]
http://bugs.python.org/issue3913
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue3891] collections.deque should have empty() method

2008-09-19 Thread Roy Smith

Roy Smith [EMAIL PROTECTED] added the comment:

I think you're missing the point.  Imagine you are somebody who doesn't know 
Python internals.  You're looking at the doc page for deque and ask yourself 
the question, How do I tell if one of these is empty?.  There's no 
information ON THAT PAGE that answers that question.  Your explanation is all 
about How do I compute the boolean value of a container?  The logical gap 
is that you need to understand that to tell if it's empty, you should compute 
the boolean value.

You give the page on boolean operations as part of the answer, but you need 
to know to go look at that page in the first place.  I should be able to look 
at the page that describes a deque and find out everything I need to know 
about that class on that page.

Essentially, what you're saying is that deque inherits some behaviors from 
container, one of which being that if you convert a container to a bool, it 
is True iff the container is not empty.  So, there should be something on the 
deque page which points to that information.

Explicit is better than implicit :-)

___
Python tracker [EMAIL PROTECTED]
http://bugs.python.org/issue3891
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com