[issue2075] Float number comparision problem

2008-02-11 Thread will

will added the comment:

The issue is reproduced under WIN32, version info as follows:
Python 2.5.1 (r251:54863, Apr 18 2007, 08:51:08) [MSC v.1310 32 bit 
(Intel)] on win32

__
Tracker <[EMAIL PROTECTED]>

__
___
Python-bugs-list mailing list 
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue2075] Float number comparision problem

2008-02-11 Thread will

New submission from will:

c=22.99*5.0
print c==114.95
"""This will produce false"""

c=22.99*4.0
print c==91.96
"""This will produce true"""

"""This is not expected behavior for python"""

--
components: Interpreter Core, Library (Lib)
messages: 62306
nosy: tsxy
severity: normal
status: open
title: Float number comparision problem
type: behavior
versions: Python 2.5

__
Tracker <[EMAIL PROTECTED]>

__
___
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-02-11 Thread Jeffrey Yasskin

Jeffrey Yasskin added the comment:

Re convergents: In the interest of minimality, I don't think
from_continued_fraction and to_continued_fraction need to stick around.
 I think the other thread established pretty conclusively that
.convergents() is not a particularly good building block for either
nearby-fraction method, so I'd let people who want it implement it
themselves. Neal Norwitz suggested and I agree that .trim() isn't
descriptive enough, so let's follow Raymond's alternative of
.limit_denominator(). Would you like to commit your implementation?

__
Tracker <[EMAIL PROTECTED]>

__
___
Python-bugs-list mailing list 
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue2066] Adding new CNS11643, a *huge* charset, support in cjkcodecs

2008-02-11 Thread Hye-Shik Chang

Hye-Shik Chang added the comment:

I've generated the mapping table from ICU's CNS11643-1992 mapping.
I see that CNS11643 is quite rarely used in the internet, but it's the
only national standard character set in Taiwan.  Asking Taiwanese
python users, even they didn't think that it's necessary to add into
Python.  I'll study how much compression is possible and how efficient
it is, then submit a revised patch again.

Thank you for comments!

__
Tracker <[EMAIL PROTECTED]>

__
___
Python-bugs-list mailing list 
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue2074] pprint._safe_repr() unsafe on ordering differently types objects with same str represenation

2008-02-11 Thread Simon Percivall

New submission from Simon Percivall:

_safe_repr() tries to handle the case where two objects are unorderable by 
ordering on (str(type(key)), key, value), but this fails when 
str(type(key)) is equal for two objects, but key is different and 
unorderable. Easy fix: order just on the string representation.

--
components: Library (Lib)
files: pprint.diff
messages: 62303
nosy: percivall
severity: normal
status: open
title: pprint._safe_repr() unsafe on ordering differently types objects with 
same str represenation
versions: Python 3.0
Added file: http://bugs.python.org/file9413/pprint.diff

__
Tracker <[EMAIL PROTECTED]>

__
___
Python-bugs-list mailing list 
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue2066] Adding new CNS11643, a *huge* charset, support in cjkcodecs

2008-02-11 Thread Kuang-che Wu

Kuang-che Wu added the comment:

FYI, according to the new spec of cns11643-2004 (you can search the 
preview from http://www.cnsonline.com.tw/, at 
http://www.cnsonline.com.tw/preview/preview.jsp?
general_no=1164300&language=C&pagecount=524).
>From page 499, it mensioned an URL http://www.cnscode.org.tw/ and the 
version 3 mapping table could be found at 
http://www.cnscode.org.tw/cnscode/csic_ucs.jsp

--
nosy: +kcwu

__
Tracker <[EMAIL PROTECTED]>

__
___
Python-bugs-list mailing list 
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue1481296] long(float('nan'))!=0L

2008-02-11 Thread Mark Dickinson

Mark Dickinson added the comment:

A late comment:  I agree with Ronald here;  mightn't it make more sense
to raise an exception (ValueError?) for long(float("nan"))?

For comparison, long(float("inf")) currently raises OverflowError, at 
least on OS X.

--
nosy: +marketdickinson

_
Tracker <[EMAIL PROTECTED]>

_
___
Python-bugs-list mailing list 
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue2066] Adding new CNS11643, a *huge* charset, support in cjkcodecs

2008-02-11 Thread Marc-Andre Lemburg

Marc-Andre Lemburg added the comment:

Some background information: http://www.cns11643.gov.tw/eng/word.jsp

The most recent version appears to be: "CNS11643-2004", sometimes also
called "CNS11643 version 3" or "CNS11643-3"
(http://docs.hp.com/en/5991-7974/5991-7974.pdf).

Here's the table for version 1 (1986):
ftp://ftp.unicode.org/Public/MAPPINGS/OBSOLETE/EASTASIA/OTHER/CNS11643.TXT

Versions 1 and 2 (1992) are also included in the official Unicode Han
character database (along with several other mappings):
http://www.unicode.org/charts/unihan.html

I couldn't find a reference to a version 3 mapping table.

__
Tracker <[EMAIL PROTECTED]>

__
___
Python-bugs-list mailing list 
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue2049] IDLE - Restart Shell & Run Module

2008-02-11 Thread Tal Einat

Tal Einat added the comment:

First of all, installing Python on Windows creates a 'Edit with IDLE'
context-menu item whenever you right-click a .py file, which opens IDLE
without a subprocess. The reason for this is that there is still a
problem regarding having several instances of IDLE, each with a
subprocess, open in parallel on Windows. The result is that many users
on Windows are often running IDLE without a subprocess; we can't treat
it as an 'expert' mode.

IMHO if you really feel strongly about this, then the Windows issue must
be resolved, and the 'Edit with IDLE' context-menu item should run IDLE
with a subprocess.


I understand your point that having the shell be restarted every time
helps teach good programming practices. But IDLE is used not only as a
learning environment; it's also a great Python shell for other purposes,
such as testing & debugging or scientific uses. I agree that these are
more advanced uses, so perhaps restarting the shell could be the
default, and the option to not have it restarted available when needed.

Thinking about it, I like the idea of an extension which is disabled by
default. I'll think about it some more, and then perhaps implement it.
Just a thought: It would be important to mention such an extension in a
prominent place in the documentation.

__
Tracker <[EMAIL PROTECTED]>

__
___
Python-bugs-list mailing list 
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue2066] Adding new CNS11643, a *huge* charset, support in cjkcodecs

2008-02-11 Thread Martin v. Löwis

Martin v. Löwis added the comment:

BTW, which version of CNS11643 does that implement? AFAICT, there is CNS
11643-1986 and CNS 11643-1992. Where did you get the Unicode mapping from?

__
Tracker <[EMAIL PROTECTED]>

__
___
Python-bugs-list mailing list 
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue2062] IDLE - autocompletion logic optimization

2008-02-11 Thread Kurt B. Kaiser

Kurt B. Kaiser added the comment:

That should be 'Issue1350'!

__
Tracker <[EMAIL PROTECTED]>

__
___
Python-bugs-list mailing list 
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue2062] IDLE - autocompletion logic optimization

2008-02-11 Thread Kurt B. Kaiser

Kurt B. Kaiser added the comment:

I agree that testing GUI apps is problematic, especially if you are
working with an intermediate version which isn't being used heavily.
Besides code review, you essentially have to run at least a subset of an
user-conducted acceptance test which tries to explore the corner cases
and generally monkey test the app.  It seems the best way beyond that is
to use the new version of IDLE to develop code for awhile; that usually
exposes at least the superficial problems.  I don't have an issues with
correcting minor bugs, but I expect the corrective patch to be small.
We have one going on CallTips which has become problematic for several
reasons, and I'll comment on it at msg59009.

Unless a person wants to fork, he has to make a deliberate effort to
stay close to the main line of development.  That can mean forgoing
things that would be 'nice to have' or non-essential refactorings. It's
a problem with distributed VCS that divergence is encouraged.  I think
you see the problem!

Are the differences in your autocomplete code significant functional
differences, or can we bring our versions into alignment at some point?
Please take into account the comments I'm going to make at msg59009
regarding 2.6/3.0 compatibility.

I really do appreciate your interest in IDLE and the work you are doing
to make it better.  I think you understand my interest in keeping it
minimal and intuitive.  It doesn't have to be like all the rest and
continually accrete features which are of limited use to the target
audience, especially at the cost of reliability and performance.

__
Tracker <[EMAIL PROTECTED]>

__
___
Python-bugs-list mailing list 
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue2066] Adding new CNS11643, a *huge* charset, support in cjkcodecs

2008-02-11 Thread Martin v. Löwis

Martin v. Löwis added the comment:

I would like to see whether a compression mechanism of the tables could
be found. If all else fails, compressing with raw zlib might improve
things, but before that, I think other compression techniques should be
studied.

I'm still -1 on ad-hoc exclusion of extension modules from pythonxy.dll.
If this module is to be excluded, a general policy should be established
that determines what modules get compiled separately, and an automation
mechanism should be established that automates generation of appropriate
build infrastructure for modules built separately under this policy.

--
nosy: +loewis

__
Tracker <[EMAIL PROTECTED]>

__
___
Python-bugs-list mailing list 
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue2073] asynchat push always sends 512 bytes (ignoring ac_out_buffer_size)

2008-02-11 Thread Mike Coleman

New submission from Mike Coleman:

In asynchat, 'push' doesn't specify 'buffer_size', so the default of 512
is used.  This is bogus and causes poor performance--it should use the
value of 'ac_out_buffer_size' instead.

--
components: Library (Lib)
messages: 62294
nosy: mkc
severity: normal
status: open
title: asynchat push always sends 512 bytes (ignoring ac_out_buffer_size)
type: behavior
versions: Python 2.5

__
Tracker <[EMAIL PROTECTED]>

__
___
Python-bugs-list mailing list 
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue2049] IDLE - Restart Shell & Run Module

2008-02-11 Thread Kurt B. Kaiser

Kurt B. Kaiser added the comment:

I disagree.  It's a major feature of the revised IDLE that code is 
run 
in a fresh environment every time.  New users will only be 
'surprised' 
once, if at all.  They will learn to put the creation of the 
objects, 
etc. that they want to retain into the top level module they are 
running.  Getting into a discussion of whether to start fresh or 
not, 
and why, adds more confusion than it eliminates, particularly for 
beginners. Also, should this be implemented, if someone were to 
accidentally make the wrong choice they are going to be *really* 
aggravated!

I would accept a patch for a hidden switch to enable this behavior 
for the unique application in question.  Maybe even better, a patch 
for a normally disabled extension to add the functionality and menu 
entries.

Running w/o the subprocess is for 'experts'.  It was rather 
surprising we were able to continue to do it.

--
severity: normal -> minor

__
Tracker <[EMAIL PROTECTED]>

__
___
Python-bugs-list mailing list 
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue456086] virtual IO for embedding Py in server

2008-02-11 Thread Raghuram Devarakonda

Raghuram Devarakonda added the comment:

I am closing it as there is no activity for long time. Please reopen if
required.

--
nosy: +draghuram
status: open -> closed


Tracker <[EMAIL PROTECTED]>


___
Python-bugs-list mailing list 
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue2072] SimpleXMLRPCServer documentation about rpc_paths might be wrong

2008-02-11 Thread Stefan Schwarzburg

New submission from Stefan Schwarzburg:

In the documentation for SimpleXMLRPCServer
(http://docs.python.org/lib/simple-xmlrpc-servers.html)it is said, that
the SimpleXMLRPCServer object has an attribute "rpc_paths" that could be
set to  valid path portions.
This would mean that changing the example code on the same page by
adding a line like:
[...] 
server = SimpleXMLRPCServer(("localhost", 8000))
server.rpc_paths = ('/test')
[...]
would result in a call to 'http://localhost:8000/test' be processed
correctly. But this is not the case.
The server object has no attribute 'rpc_paths' nor does creating an
attribute like this change anything.

What however works is a line like this:
[...]
server.RequestHandlerClass.rpc_paths = ('/test')
[...]

The reason for this is that the test 'is_rpc_path_valid' is a method of
the class SimpleXMLRPCRequestHandler which tests if the path is in  the
class attribute 'rpc_paths' of SimpleXMLRPCRequestHandler. This class is
saved as RequestHandlerClass in SimpleXMLRPCServer. 

So the behavior of the code is understandable but is not described by
the documentation.

--
components: Documentation
files: SimpleXMLRPCServerTEST.tgz
messages: 62291
nosy: schwarz
severity: normal
status: open
title: SimpleXMLRPCServer documentation about  rpc_paths might be wrong
type: behavior
versions: Python 2.5
Added file: http://bugs.python.org/file9412/SimpleXMLRPCServerTEST.tgz

__
Tracker <[EMAIL PROTECTED]>

__
___
Python-bugs-list mailing list 
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue2016] Crash when modifying the **kwargs passed to a function.

2008-02-11 Thread Guido van Rossum

Guido van Rossum added the comment:

I have a proposed minimal fix, but I wonder if this would break existing
code (apart from the exploit given here).  Martin?  (I think the
discussion between Alexander and Amaury can be ignored for the purpose
of reviewing the fix; only the exploit matters.)

--
assignee:  -> loewis
nosy: +gvanrossum, loewis
Added file: http://bugs.python.org/file9411/fix2016.txt

__
Tracker <[EMAIL PROTECTED]>

__
___
Python-bugs-list mailing list 
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue1745035] DoS smtpd vulnerability

2008-02-11 Thread Giampaolo Rodola'

Changes by Giampaolo Rodola':


--
versions: +Python 2.6, Python 3.0

_
Tracker <[EMAIL PROTECTED]>

_
___
Python-bugs-list mailing list 
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue2067] file.__exit__ does not call subclass' close method

2008-02-11 Thread Alexander Belopolsky

New submission from Alexander Belopolsky:

Attached patch makes file.__exit__ call subclass' close method.

--
components: Interpreter Core
files: file_exit.diff
messages: 62289
nosy: belopolsky
severity: normal
status: open
title: file.__exit__ does not call subclass' close method
type: behavior
versions: Python 2.6
Added file: http://bugs.python.org/file9410/file_exit.diff

__
Tracker <[EMAIL PROTECTED]>

__
___
Python-bugs-list mailing list 
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue2047] shutil.destinsrc returns wrong result when source path matches beginning of destination path

2008-02-11 Thread Raghuram Devarakonda

Raghuram Devarakonda added the comment:

> Raghuram, you've been too fast ;-)

Sorry about that :-) and thanks for validating the test cases.

__
Tracker <[EMAIL PROTECTED]>

__
___
Python-bugs-list mailing list 
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue2065] trunk version does not compile with vs8 and vc6

2008-02-11 Thread Amaury Forgeot d'Arc

Amaury Forgeot d'Arc added the comment:

Attached a patch to compile trunk with vc6 and vs8.
Most tests pass with these two compilers.

Tests needed for vs7 and vs9!

Added file: http://bugs.python.org/file9409/issue2065.patch

__
Tracker <[EMAIL PROTECTED]>

__
___
Python-bugs-list mailing list 
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue2062] IDLE - autocompletion logic optimization

2008-02-11 Thread Tal Einat

Tal Einat added the comment:

Well, I admit, I haven't tested this enough. Specifically, there is a
bug in this patch (both versions); please delete it.


I accept your criticism of my latest patches, they truly are of inferior
quality. I deeply apologize for having taken up more of your time than I
should have.


Allow me to explain my situation:

I work with a highly modified version of IDLE to which I have added many
features, and which is also used daily by ~10 friends and colleagues.
Many of these patches are my attempt to contribute the more mature and
successful changes/features back to CPython. However, the completion
code differs greatly from the CPython version, making porting changes a
large effort, requiring me to re-implement many things, as well as go
once more through the process of testing and debugging.

This is really a great deal of work and I have been eager to contribute
some of the better features. While I have tried to be methodical,
thorough and test everything, I seem to still have been too hasty. I
must tell you that I spent many hours preparing the last few patches,
but I realize that doing half a job is worse than not doing it at all.

In the future I will test every change much more thoroughly before
posting it as a patch.

__
Tracker <[EMAIL PROTECTED]>

__
___
Python-bugs-list mailing list 
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue2021] Turn NamedTemporaryFile into a context manager

2008-02-11 Thread Nick Coghlan

Nick Coghlan added the comment:

Backported to 2.5 in r60728

P.S. To elaborate a bit more on why converting NamedTemporaryFile to
subclass file would be a much bigger deal than it is to just fix its
__enter__ and __exit__ methods:
- converts from old-style to new-style class
- imposes the constraints of a C base class on any subclasses
- file attribute is currently part of the public API
- need to retain wrapper approach in tempfile anyway for related type
SpooledTemporaryFile in 2.6 (as that may contain a real file or a string
IO object at different points in its lifecycle)
- no compelling use case for the change (the wrapper approach works,
what real advantage do we gain from subclassing file instead?)
- wrapper approach is much easier to reconcile with Python 3.0's io module

--
status: pending -> closed

__
Tracker <[EMAIL PROTECTED]>

__
___
Python-bugs-list mailing list 
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue2066] Adding new CNS11643, a *huge* charset, support in cjkcodecs

2008-02-11 Thread Amaury Forgeot d'Arc

Amaury Forgeot d'Arc added the comment:

In this case let's put the cjkcodecs modules in their own
DLL(s) on win32.

--
nosy: +amaury.forgeotdarc

__
Tracker <[EMAIL PROTECTED]>

__
___
Python-bugs-list mailing list 
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue2066] Adding new CNS11643, a *huge* charset, support in cjkcodecs

2008-02-11 Thread Marc-Andre Lemburg

Marc-Andre Lemburg added the comment:

How often would this character set be needed ?

In any case, using a (pre)compiler switch is not a good idea. Please add
support to enable/disable the support via a configure switch.

--
nosy: +lemburg

__
Tracker <[EMAIL PROTECTED]>

__
___
Python-bugs-list mailing list 
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue2066] Adding new CNS11643, a *huge* charset, support in cjkcodecs

2008-02-11 Thread Hye-Shik Chang

Changes by Hye-Shik Chang:


--
title: Adding new CNS11643 support, a *huge* charset, in cjkcodecs -> Adding 
new CNS11643, a *huge* charset, support in cjkcodecs

__
Tracker <[EMAIL PROTECTED]>

__
___
Python-bugs-list mailing list 
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue2066] Adding new CNS11643 support, a *huge* charset, in cjkcodecs

2008-02-11 Thread Hye-Shik Chang

New submission from Hye-Shik Chang:

This patch adds CNS11643 support into Python unicode codecs.
CNS11643 is a huge character which is used in EUC-TW and ISO-2022-CN.
CJKCodecs have had the CNS11643 support for 4 years at least,
but I dropped it because of its huge size in integrating into Python.
EUC-TW and ISO-2022-CN aren't being used widely while they are
still regarded as part of major encodings yet.

In my patch, disabling the CNS11643 charset support is possible by
adding -DNO_CNS11643 in CFLAGS for light platforms. Mapping source
code size of the charset is 900K and it adds about 350K into
_codecs_tw.so (in POSIX) or python26.dll (in Win32).

What do you think about adding this code?

--
components: Unicode
files: cns11643-r1.diff.gz
messages: 62282
nosy: hyeshik.chang
priority: low
severity: normal
status: open
title: Adding new CNS11643 support, a *huge* charset, in cjkcodecs
versions: Python 2.6, Python 3.0
Added file: http://bugs.python.org/file9408/cns11643-r1.diff.gz

__
Tracker <[EMAIL PROTECTED]>

__
___
Python-bugs-list mailing list 
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue2049] IDLE - Restart Shell & Run Module

2008-02-11 Thread Tal Einat

Tal Einat added the comment:

I agree that the interface should be kept as simple as possible, but
this is a meaningful and important addition, which will help clarify to
the users how to work with the subprocess. The point of this change is
avoid surprising the user, while also making the interface more
straightforward and consistent.


The major usage issues that this patch addresses, as I see them, are:

1. New users are surprised and aggravated when they first use 'Run
Module', because they weren't expecting the shell to be restarted,
causing them to lose a lot of work done before the restart. This also
happens to experienced users sometimes (accidents happen) and can be
very frustrating. I don't think the 'normal state' should be to restart
the shell, rather this should always be explicitly requested by the user.

2. When working with a subprocess, there is no (simple) way to just run
the module in the shell without restarting it.

3. Inconsistency in the functionality of 'Run Module' depending on
whether you have a subprocess.


The problem with the configuration option approach is that if you
configure 'Run Module' to not restart, then restarting requires:
switching to the Shell window, restarting, switching back to the editor
window, and running the module: 4 actions instead of one.

__
Tracker <[EMAIL PROTECTED]>

__
___
Python-bugs-list mailing list 
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue2057] difflib: add patch capability

2008-02-11 Thread Christian Heimes

Changes by Christian Heimes:


--
priority:  -> low

__
Tracker <[EMAIL PROTECTED]>

__
___
Python-bugs-list mailing list 
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue2060] python2.6 -3 gives "warning: callable() not supported in 3.x" on startup

2008-02-11 Thread Christian Heimes

Christian Heimes added the comment:

IMO the warning can be removed. The 2to3 tool can easily migrate any
callable(spam) to hasattr(spam, '__call__').

--
nosy: +tiran
priority:  -> normal
type:  -> rfe

__
Tracker <[EMAIL PROTECTED]>

__
___
Python-bugs-list mailing list 
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue2055] test_fcntl.py converted to unittest

2008-02-11 Thread Christian Heimes

Changes by Christian Heimes:


--
keywords: +patch
priority:  -> normal

__
Tracker <[EMAIL PROTECTED]>

__
___
Python-bugs-list mailing list 
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue2062] IDLE - autocompletion logic optimization

2008-02-11 Thread Christian Heimes

Changes by Christian Heimes:


--
keywords: +patch
priority:  -> normal

__
Tracker <[EMAIL PROTECTED]>

__
___
Python-bugs-list mailing list 
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue2061] IDLE - autocompletion to support alternate patch separators

2008-02-11 Thread Christian Heimes

Changes by Christian Heimes:


--
assignee:  -> kbk
keywords: +patch
priority:  -> normal

__
Tracker <[EMAIL PROTECTED]>

__
___
Python-bugs-list mailing list 
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue2063] os.times() utime and stime exchanged on windows

2008-02-11 Thread Christian Heimes

Changes by Christian Heimes:


--
assignee:  -> tiran
keywords: +patch
nosy: +tiran
priority:  -> high

__
Tracker <[EMAIL PROTECTED]>

__
___
Python-bugs-list mailing list 
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue2064] List of Dicts problem

2008-02-11 Thread Christian Heimes

Christian Heimes added the comment:

It's a classic problem for new Python developers. You have declared a
mutable object at class level. styles and widgets are the same object
for all instances of Widget and Container. You have to create them
inside the initializer.

Try

class Widget:
def __init__(self):
self.styles = {}

Next time please use the mailing list instead of the bug tracker to get
help.

--
nosy: +tiran
resolution:  -> invalid
status: open -> closed

__
Tracker <[EMAIL PROTECTED]>

__
___
Python-bugs-list mailing list 
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue2021] Turn NamedTemporaryFile into a context manager

2008-02-11 Thread Nick Coghlan

Nick Coghlan added the comment:

The wrapper approach has the virtue of providing easy access to the
underlying file object and its methods. That actually gets a bit more
difficult when you switch to a subclassing approach (you need to either
explicitly qualify the methods or play around with super()).

The wrapper approach also has the virtue of being a valid candidate for
backport to 2.5.2, while that is most definitely *not* the case for
making file fully subclassable. If you would like to pursue that idea
further, I suggest opening a separate issue for it.

__
Tracker <[EMAIL PROTECTED]>

__
___
Python-bugs-list mailing list 
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue2065] trunk version does not compile with vs8 and vc6

2008-02-11 Thread Christian Heimes

Changes by Christian Heimes:


--
nosy: +tiran
priority:  -> high
resolution:  -> accepted

__
Tracker <[EMAIL PROTECTED]>

__
___
Python-bugs-list mailing list 
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue1763] Winpath module - easy access to Windows directories like My Documents

2008-02-11 Thread Amaury Forgeot d'Arc

Amaury Forgeot d'Arc added the comment:

> I'm using win2000, and latest free compiler doesn't support it :-(
I hope it does. r60696 is only about supporting win2000 when compiled
with vs9.

Building with vc6 should be corrected. I filed issue2065.

__
Tracker <[EMAIL PROTECTED]>

__
___
Python-bugs-list mailing list 
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue2065] trunk version does not compile with vs8 and vc6

2008-02-11 Thread Amaury Forgeot d'Arc

New submission from Amaury Forgeot d'Arc:

Since r60696, WINVER is forced to _WIN32_WINNT_WIN2K. This has two problems:
- Vs8 (and before) does not define _WIN32_WINNT_WIN2K. It should be
replaced with 0x500.
- When WINVER is set to 0x500, vc6 gives a long warning because at the
time, windows nt 5.0 was only at beta stage. Moreover, there are other
clashes between winsock.h and winsock2.h, that show up when WINVER is 0x500.

To correct this, I propose:
- To replace _WIN32_WINNT_WIN2K and similar constants by their values.
- That 0x500 is not the required value, but the *maximum* value
necessary when targeting win2k. VC6 can set it to 0x400.

I'll try a patch later tonight.

--
components: Windows
messages: 62276
nosy: amaury.forgeotdarc
severity: normal
status: open
title: trunk version does not compile with vs8 and vc6
versions: Python 2.6

__
Tracker <[EMAIL PROTECTED]>

__
___
Python-bugs-list mailing list 
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue2064] List of Dicts problem

2008-02-11 Thread Heather

New submission from Heather:

I have tried both Python 2.4.4 and 2.5.1 and for both, I get the
following results when running the following code:
IDLE 1.2.1  
>>> class Style:
   stylename=''
   value=''

>>> class Widget:
   styles = {}
   def setStyle(self, stylename, value):
   style = Style()
   style.stylename = stylename
   style.value = value
   self.styles[stylename]=style

>>> class Container:
   widgets = []
   def addWidget(self, stylename, value):
   widget = Widget()
   widget.setStyle(stylename,value)
   self.widgets.append(widget)

>>> container = Container()
>>> container.addWidget('backgroundColor','red')
>>> container.widgets[0].styles['backgroundColor'].value
'red'
>>> container.addWidget('backgroundColor','blue')
>>> container.widgets[0].styles['backgroundColor'].value
'blue'
>>> container.widgets[1].styles['backgroundColor'].value
'blue'
>>> 
If I am doing something wrong here, please let me know. But it seems to
me to be an error that List.append() will overwrite existing entries
when using the code above - - 
Thank you,

-Heather

--
components: None
messages: 62275
nosy: sunaluak
severity: major
status: open
title: List of Dicts problem
type: behavior
versions: Python 2.4, Python 2.5

__
Tracker <[EMAIL PROTECTED]>

__
___
Python-bugs-list mailing list 
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue1751245] Popen pipe file descriptor leak on OSError in init

2008-02-11 Thread Kuang-che Wu

Changes by Kuang-che Wu:


Added file: http://bugs.python.org/file9407/diff-issue1751245.txt

_
Tracker <[EMAIL PROTECTED]>

_
___
Python-bugs-list mailing list 
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com