[issue3099] On windows, import nul always succeed

2008-07-01 Thread Hirokazu Yamamoto

Hirokazu Yamamoto [EMAIL PROTECTED] added the comment:

GetFileAttributes() succeeds for nul, but GetFileAttributesEx() fails.
Maybe is it good idea to use GetFileAttributesEx()?

# test code

import ctypes
import ctypes.wintypes as type

dll = ctypes.windll.kernel32

print dll.GetFileAttributesA(nul) # 32

class WIN32_FILE_ATTRIBUTE_DATA(ctypes.Structure):
_fields_ = [(dwFileAttributes, type.DWORD),
(ftCreationTime, type.FILETIME),
(ftLastAccessTime, type.FILETIME),
(ftLastWriteTime, type.FILETIME),
(nFileSizeHigh, type.DWORD),
(nFileSizeLow, type.DWORD)]

GetFileExInfoStandard = 0

wfad = WIN32_FILE_ATTRIBUTE_DATA()

print dll.GetFileAttributesExA(nul, GetFileExInfoStandard,
ctypes.byref(wfad)) # 0

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



[issue3242] Segfault in PyFile_SoftSpace/PyEval_EvalFrameEx with sys.stdout reassigned

2008-07-01 Thread Amaury Forgeot d'Arc

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

I reproduced the problem on windows, and it is indeed a problem with the
print statement, when the write() method reassigns sys.stdout: the
code calls PyFile_WriteString(), then PyFile_SoftSpace on the same
object, which has been freed in your case.
A pair of INCREF/DECREF did the trick. See attached patch.

--
keywords: +patch
nosy: +amaury.forgeotdarc
Added file: http://bugs.python.org/file10788/print.patch

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



[issue3249] bug adding datetime.timedelta to datetime.date

2008-07-01 Thread Chris Withers

New submission from Chris Withers [EMAIL PROTECTED]:

The following demonstrates the problem:

 from datetime import datetime,timedelta
 datetime.now().date()+timedelta(hours=1)
datetime.date(2008, 7, 1)

I'd expect the above to either result in a TypeError or (preferably)
datetime.datetime(2008, 7, 1, 1, 0)

--
components: Library (Lib)
messages: 69041
nosy: cjw296
severity: normal
status: open
title: bug adding datetime.timedelta to datetime.date
versions: Python 2.4, Python 2.5

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



[issue3250] datetime.time does not support arithmetic

2008-07-01 Thread Chris Withers

New submission from Chris Withers [EMAIL PROTECTED]:

 from datetime import time
 time(9,0)-time(8,0)
Traceback (most recent call last):
  File stdin, line 1, in module
TypeError: unsupported operand type(s) for -: 'datetime.time' and
'datetime.time'

I'd expect a datetime.timedelta(0,3600)

--
components: Library (Lib)
messages: 69042
nosy: cjw296
severity: normal
status: open
title: datetime.time does not support arithmetic
versions: Python 2.4, Python 2.5

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



[issue3250] datetime.time does not support arithmetic

2008-07-01 Thread Benjamin Peterson

Changes by Benjamin Peterson [EMAIL PROTECTED]:


--
type:  - feature request
versions: +Python 2.7 -Python 2.4, Python 2.5

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



[issue3249] bug adding datetime.timedelta to datetime.date

2008-07-01 Thread Tim Peters

Tim Peters [EMAIL PROTECTED] added the comment:

This isn't a bug, since it's functioning as documented and designed.
Read note 1 in the date Objects section of the reference manual,
explaining the meaning of date2 = date1 + timedelta:


date2 is moved forward in time if timedelta.days  0, or backward if
timedelta.days  0. Afterward date2 - date1 == timedelta.days.
timedelta.seconds and timedelta.microseconds are ignored. OverflowError
is raised if date2.year would be smaller than MINYEAR or larger than
MAXYEAR.

).

You could call this a feature request instead, but an incompatible
change to documented always-worked-this-way behavior is unlikely to be
accepted.

--
nosy: +tim_one

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



[issue3249] bug adding datetime.timedelta to datetime.date

2008-07-01 Thread Benjamin Peterson

Changes by Benjamin Peterson [EMAIL PROTECTED]:


--
resolution:  - invalid
status: open - closed

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



[issue3252] str.tobytes() and bytes/bytearray.tostr()

2008-07-01 Thread Mark Summerfield

New submission from Mark Summerfield [EMAIL PROTECTED]:

I know it is almost certainly too late, but I think a lot of people will
be confused by str.decode() and bytes.encode() (or was that the other
way around)?

Calling the methods str.tobytes() and bytes.tostr() (or nicer,
str.to_bytes() and bytes.to_str()) would be hard to confuse and IMO will
lead to fewer bug reports and complaints once Python 3.0 final comes out.

And there is a kind of precedent in that threading.isDaemon() became
threading.is_daemon() between 30a5 and 30b1.

--
components: Interpreter Core
messages: 69047
nosy: mark
severity: normal
status: open
title: str.tobytes() and bytes/bytearray.tostr()
type: feature request
versions: Python 3.0

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



[issue3000] 2to3 doesn't handle print(whatever); print nor string.* functions

2008-07-01 Thread Mark Summerfield

Changes by Mark Summerfield [EMAIL PROTECTED]:


--
type:  - behavior

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



[issue3252] str.tobytes() and bytes/bytearray.tostr()

2008-07-01 Thread Benjamin Peterson

Benjamin Peterson [EMAIL PROTECTED] added the comment:

-1
encoding and decoding is generally accepted terminology. Besides then we
would be binding ourselves to returning bytes or a str; that's not
necessarily guaranteed.

Anyway, I think this hardly has a chance in the place we are (between
betas).

--
nosy: +benjamin.peterson

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



[issue3242] Segfault in PyFile_SoftSpace/PyEval_EvalFrameEx with sys.stdout reassigned

2008-07-01 Thread Brodie Rao

Brodie Rao [EMAIL PROTECTED] added the comment:

Thanks. The patch fixes the crash for me on Python 2.5.2 and 2.6b1 on OS X 
and Python 2.4.5 on Debian and Ubuntu.

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



[issue3218] 2to3 Fix_imports optimization

2008-07-01 Thread Collin Winter

Collin Winter [EMAIL PROTECTED] added the comment:

The change to pytree.py doesn't add much speed benefit over the
fix_imports.py change, and causes a test to fail.

The fix_imports.py change, on the other hand, takes the test suite run
time from 8m31s down to 1m45s -- this needs to go in!

That said, I don't think the change is correct: you remove the portion
of the pattern that matches from foo import bar, baz, x, y as z, as
well as the portion that matches foo.bar in the body of the code,
where foo is a module to be renamed. These should be added back, but
with support for member matching removed.

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



[issue3252] str.tobytes() and bytes/bytearray.tostr()

2008-07-01 Thread Marc-Andre Lemburg

Marc-Andre Lemburg [EMAIL PROTECTED] added the comment:

There's nothing new to .encode() and .decode(). They have existed since
Python 1.6.

--
nosy: +lemburg
resolution:  - wont fix
status: open - closed

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



[issue3253] shutil.move bahave unexpected in fat32

2008-07-01 Thread grissiom

New submission from grissiom [EMAIL PROTECTED]:

Build the environment in a fat32 file system:
$echo test  test_move
$mkdir testmove

If I shutil.move('test_move', 'testmove'), it will raise: 
Traceback (most recent call last):
  File testmove.py, line 5, in module
shutil.move('test_move', 'test_python')
  File /usr/lib/python2.5/shutil.py, line 199, in move
copy2(src,dst)
  File /usr/lib/python2.5/shutil.py, line 92, in copy2
copystat(src, dst)
  File /usr/lib/python2.5/shutil.py, line 69, in copystat
os.chmod(dst, mode)
OSError: [Errno 1] Operation not permitted: 'test_python/test_move'

If I shutil.move('test_move', 'testmove/testmove'), it will succeed
quietly. This problem doesn't happen in an ext3 file system.

--
components: Library (Lib)
messages: 69053
nosy: grissiom
severity: normal
status: open
title: shutil.move bahave unexpected in fat32
type: behavior
versions: Python 2.5

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



[issue3239] curses/textpad.py incorrectly and redundantly imports ascii

2008-07-01 Thread Georgij Kondratjev

Georgij Kondratjev [EMAIL PROTECTED] added the comment:

 import curses.ascii as curses_ascii

If you like curses_ascii you would probably like curses.ascii :) so here
is the patch. I tested it with module built-in testing facility (if
__name__ == '__main__') but didn't run other tests.

Patch with patch -i curses-textpad-ascii.patch
src/python/Lib/curses/textpad.py

--
keywords: +patch
Added file: http://bugs.python.org/file10790/curses-textpad-ascii.patch

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



[issue3218] 2to3 Fix_imports optimization

2008-07-01 Thread Nick Edds

Nick Edds [EMAIL PROTECTED] added the comment:

Here is a diff for the both the fix_imports changes which I corrected,
and the pytree changes. The pytree changes were a lot more significant
before the fix_imports change, but I think they are still a decent
improvement. I think I have now restored the functionality you wanted
without the members, although I'm not quite sure I made the patterns
exactly right. I tested the from a import b as c, as well as in text
foo.bar references, and they seemed to be corrected properly.

--
keywords: +patch
Added file: http://bugs.python.org/file10791/fix_imports.diff

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



[issue3174] 3.0b1 doesn't seem to install on macs

2008-07-01 Thread Benjamin Peterson

Benjamin Peterson [EMAIL PROTECTED] added the comment:

Ok. I tried to get it working in r64618.

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



[issue2683] subprocess.Popen.communicate takes bytes, not str

2008-07-01 Thread Georg Brandl

Georg Brandl [EMAIL PROTECTED] added the comment:

Fixed docs in r64619.

--
resolution:  - fixed
status: open - closed

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



[issue2683] subprocess.Popen.communicate takes bytes, not str

2008-07-01 Thread Rafael Zanella

Rafael Zanella [EMAIL PROTECTED] added the comment:

_communicate still encodes the string under the hood

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



[issue3219] repeated keyword arguments

2008-07-01 Thread Benjamin Peterson

Benjamin Peterson [EMAIL PROTECTED] added the comment:

Done for 2.6 in r64622. (Georg reviewed.)

--
resolution:  - fixed
status: open - closed

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



[issue3174] 3.0b1 doesn't seem to install on macs

2008-07-01 Thread Benjamin Peterson

Changes by Benjamin Peterson [EMAIL PROTECTED]:


--
resolution:  - fixed
status: open - closed

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



[issue2683] subprocess.Popen.communicate takes bytes, not str

2008-07-01 Thread Georg Brandl

Georg Brandl [EMAIL PROTECTED] added the comment:

You're right, I fixed that too in r64621.

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



[issue3220] Improve Bytes and Byte Array Methods doc

2008-07-01 Thread Georg Brandl

Georg Brandl [EMAIL PROTECTED] added the comment:

 Lib Ref/Built-in Types/Sequence Types/Bytes and Byte Array Methods
  
 The following set/frozenset and dict sections repeat (and for dicts,
 expands upon) the constructor interface from the Built-in Functions
 section.  The sequence type sections do not.  There should as least be a
 reference back.  For the constructor interface, see xxx

Right -- I need to reorganize that section a bit more, and this is on
the list to do.

 Similarly there is no mention here of the difference between bytes and
 bytearray, as there is below for the difference between set and
 frozenset.  I think there should be here, in this section, even though
 there is back in Built-in Functions.

The difference is mentioned under the sequence types heading.

 (Sets/frozenset have the opposite problem in that Built-in Functions
 makes no mention that one is mutable and the other is not.  I also think
 just one word for each should be added there too.)
  
 The bytes and bytearray types have an additional class method:
 bytes.fromhex(string)  should be followed by
 bytearray.fromhex(string) and
 This bytes class method returns a bytes object, changed to
 These class methods return a bytes or bytearray object,

Agreed.

 I don't think the line 'Example:' is needed.

Yep.

 A thread today on the Py3 lists again brought up the issue that just as
 bytes can be created by either a literal or class call, they could be
 represented on output by either, with possible confusion.
 Guido responded
  Only if you didn't know that b'' is an alternative to bytes(). The b''
  notation is so much more compact and so  much more helpful that I
  really don't want to go back to it. We will somehow have to deal with
  this through education and documentation.
  
 I suggest adding at the end:
 Just as a bytes objects can be constructed either with a literal or a
 class constructor call, they could be represented on output either by a
 literal or class constructor call.  The literal was chosen as being
 shorter, generally more useful, and consistent with how other classes
 are displayed.  Similarly, the display of bytearrays uses the
 corresponding bytes literal.  If you want to see the bytes of either
 class as integers, use tuple.
  
  a, b = b'abc', bytes((1,2,3))
  a,b
 (b'abc', b'\x01\x02\x03')
  tuple(a), tuple(b)
 ((97, 98, 99), (1, 2, 3))
  c = bytearray(a)
  c, tuple(c)
 (bytearray(b'abc'), (97, 98, 99))
 

The same section that documents the bytes/bytearray difference also already
mentions this; I've amended it a bit to include the bit about
representation.

Committed changes as r64627.

--
resolution:  - fixed
status: open - closed

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



[issue3217] make text is broken

2008-07-01 Thread Georg Brandl

Georg Brandl [EMAIL PROTECTED] added the comment:

Fixed with r64629.

--
resolution:  - fixed
status: open - closed

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



[issue3240] IDLE environment corrupts string.letters

2008-07-01 Thread Georg Brandl

Georg Brandl [EMAIL PROTECTED] added the comment:

Well, that wouldn't be different if you had set the locale in your
prompt. In short, ``u'a' in string.letters`` can never work with any
string.letters except the default, English-only one, and therefore is wrong.

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



[issue3203] sphinx - table of contents doesn't render correctly (html)

2008-07-01 Thread Georg Brandl

Georg Brandl [EMAIL PROTECTED] added the comment:

This is already on my to-do list. Thanks for raising it as an issue
though, I won't forget it so easily this way :)

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



[issue1682] Move Demo/classes/Rat.py to Lib/fractions.py and fix it up.

2008-07-01 Thread Mark Dickinson

Mark Dickinson [EMAIL PROTECTED] added the comment:

Well, I can't find anything more to fuss about here. :-)

Reclosing.

--
status: open - closed

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



[issue3191] round docstring is inaccurate

2008-07-01 Thread Georg Brandl

Georg Brandl [EMAIL PROTECTED] added the comment:

Fixed in r64634.

--
resolution:  - fixed
status: open - closed

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



[issue1523853] 2.4.2 file.read caches EOF state

2008-07-01 Thread Georg Brandl

Georg Brandl [EMAIL PROTECTED] added the comment:

Added note in r64635.

--
resolution:  - fixed
status: open - closed

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



[issue1410739] Add notes to the manual about `is` and methods

2008-07-01 Thread Georg Brandl

Georg Brandl [EMAIL PROTECTED] added the comment:

Reworded a bit and applied as r64638.

--
resolution:  - fixed
status: open - closed

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



[issue3242] Segfault in PyFile_SoftSpace/PyEval_EvalFrameEx with sys.stdout reassigned

2008-07-01 Thread Amaury Forgeot d'Arc

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

Corrected as r64633 (trunk) and r64639 (release25-maint). version 3.0 is
not affected, and there won't be any more 2.4 release.

Thanks for the report!

--
resolution:  - fixed
status: open - closed

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



[issue3251] references are case insensitive

2008-07-01 Thread Georg Brandl

Georg Brandl [EMAIL PROTECTED] added the comment:

Thanks, fixed in r64642.

--
resolution:  - fixed
status: open - closed

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



[issue2351] Using __(get|set|del)slice__ needs a Py3K warning

2008-07-01 Thread Georg Brandl

Changes by Georg Brandl [EMAIL PROTECTED]:


--
assignee: georg.brandl - 

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



[issue3254] Suggestion: change default behavior of __ne__

2008-07-01 Thread cvp

New submission from cvp [EMAIL PROTECTED]:

After defining my own __eq__ method for a class that judged equality
based on a 'name' variable, imagine my surprise to see this:

In [20]: my_graph.edges[-1].end == my_graph.vertices[-1]
Out [20]: True

In [21]: my_graph.edges[-1].end != my_graph.vertices[-1]
Out [21]: True

...all because I forgot to modify __ne__ as well.

I think __ne__ should be changed to 'not __eq__' for the sake of
consistency.

--
messages: 69078
nosy: cvp
severity: normal
status: open
title: Suggestion: change default behavior of __ne__
type: behavior

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



[issue2885] Create the urllib package

2008-07-01 Thread Brett Cannon

Brett Cannon [EMAIL PROTECTED] added the comment:

And it looks like the 2.6 docs need to be updated as well.

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



[issue3254] Suggestion: change default behavior of __ne__

2008-07-01 Thread Benjamin Peterson

Benjamin Peterson [EMAIL PROTECTED] added the comment:

Sorry, this is documented [1], and it unlikely to ever be changed. 

[1] http://docs.python.org/ref/customization.html

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

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



[issue3254] Suggestion: change default behavior of __ne__

2008-07-01 Thread cvp

cvp [EMAIL PROTECTED] added the comment:

1) I didn't say that the option to edit __ne__ should be removed, only that
it'd be both more consistent and convenient to change the meaning to
something relative by default.

2) So long as the old code defines __ne__, which I'm guessing is the code
that you're telling me will break, I still don't see how this will cause any
issues whatsoever. I mean, I guess it could mess up some people who were
using '!=' to be *intentionally* synonymous with 'is not', but that's
awfully contrived for a language that's supposed to be well-known for being
straight-forward and easily readable.

-Constantine

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

___
Python tracker [EMAIL PROTECTED]
http://bugs.python.org/issue3254
___1) I didn#39;t say that the option to edit __ne__ should be removed, only that 
it#39;d be both more consistent and convenient to change the meaning to 
something relative by default.brbr2) So long as the old code defines 
__ne__, which I#39;m guessing is the code that you#39;re telling me will 
break, I still don#39;t see how this will cause any issues whatsoever. I mean, 
I guess it could mess up some people who were using #39;!=#39; to be 
*intentionally* synonymous with #39;is not#39;, but that#39;s awfully 
contrived for a language that#39;s supposed to be well-known for being 
straight-forward and easily readable.br
br-Constantinebr
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue3254] Suggestion: change default behavior of __ne__

2008-07-01 Thread cvp

Changes by cvp [EMAIL PROTECTED]:


Removed file: http://bugs.python.org/file10792/unnamed

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



[issue3254] Suggestion: change default behavior of __ne__

2008-07-01 Thread cvp

Changes by cvp [EMAIL PROTECTED]:


Removed file: http://bugs.python.org/file10793/unnamed

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



[issue2275] urllib2 header capitalization

2008-07-01 Thread Senthil

Changes by Senthil [EMAIL PROTECTED]:


Removed file: http://bugs.python.org/file9907/issue2275.patch

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



[issue2275] urllib2 header capitalization

2008-07-01 Thread Senthil

Senthil [EMAIL PROTECTED] added the comment:

Issue applicable to Py2.6 and Py3K. Previous patch attached was wrong.
Removed it.

--
versions: +Python 2.6, Python 3.0

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



[issue3214] Suggest change to glossary explanation: Duck Typing

2008-07-01 Thread Paddy McCarthy

Paddy McCarthy [EMAIL PROTECTED] added the comment:

Hi Georg,
A bit of relevant background about me: 
  I've been interested in Duck Typing _specifically_ for a couple of
years when I started watching edits to it on Wikipedia. I researched the
history of the use of the term and changed the attribution of first use
to Alex Martelli after digging in Google, and still trawl reading code
and articles on the subject. But I DONT think this makes me an expert -
Duck typing is a 'mould-able' term and the things we write about it help
to define it.

On your comment about hasattr:
  I think more and more that Duck-Typing is what allows us, (as in
Python), to substitute one class for another in a method previously
designed with only the other in mind - you know, as in the canonical
example of file-like objects such as StringIO substituting in methods
defined originally for files. In this case hasattr checks don't add
anything, and EAFP is all important.

I tried to get wider context on this by posting it originally to
comp.lang.python but no one was interested. I don't normally frequent
the developers forumbut maybe we should open the issue to that audience?

- Paddy.

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