[issue6367] Change the instruction pointer in python

2009-06-30 Thread vinoth

vinoth 4vin...@gmail.com added the comment:

I hope exceptions are not created for that purpose,and it is not the actual*
/*right way i hope. because,

if any of the called methods has the try: except: block, it fails..

and we can't guide other coders, Don't use try: except: as it is the
language neutral power.

But it is easy to implement.  Just do as we do in case of exception, but in
a user defined way. I hope.

Thanks
Vinoth

On Tue, Jun 30, 2009 at 2:41 AM, Martin v. Löwis rep...@bugs.python.orgwrote:


 Martin v. Löwis mar...@v.loewis.de added the comment:

 Actually, Python has non-local gotos already, and in a structured way:
 by means of exceptions. I don't understand why it is not a actual way
 - please do consider using a custom exception for that.

 --
 nosy: +loewis

 ___
 Python tracker rep...@bugs.python.org
 http://bugs.python.org/issue6367
 ___


--
Added file: http://bugs.python.org/file14403/unnamed

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue6367
___brI hope exceptions are not created for that purpose,and it is not the 
actualb//bright way i hope. because, brbrif any of the called methods 
has the try: except: block, it fails.. brbrand we can#39;t guide other 
coders, quot;Don#39;t use try: except:quot; as it is the language neutral 
power.br
brBut it is easy to implement.  Just do as we do in case of exception, but 
in a user defined way. I hope.brbrThanksbrVinothbrbrdiv 
class=gmail_quoteOn Tue, Jun 30, 2009 at 2:41 AM, Martin v. Löwis span 
dir=ltrlt;a 
href=mailto:rep...@bugs.python.org;rep...@bugs.python.org/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
Martin v. Löwis lt;a 
href=mailto:mar...@v.loewis.de;mar...@v.loewis.de/agt; added the 
comment:br
br
Actually, Python has non-local gotos already, and in a structured way:br
by means of exceptions. I don#39;t understand why it is quot;not a actual 
wayquot;br
- please do consider using a custom exception for that.br
br
--br
nosy: +loewisbr
divdiv/divdiv class=h5br
___br
Python tracker lt;a 
href=mailto:rep...@bugs.python.org;rep...@bugs.python.org/agt;br
lt;a href=http://bugs.python.org/issue6367; 
target=_blankhttp://bugs.python.org/issue6367/agt;br
___br
/div/div/blockquote/divbrbr clear=allbr-- brvinbr
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue6380] Deadlock during the import in the fork()'ed child process if fork() happened while import_lock was held

2009-06-30 Thread Dmitriy Khramtsov

Dmitriy Khramtsov hig...@gmail.com added the comment:

 Does the problem also exist in Python 2.6? We will definitely not fix it
 anymore for 2.4 and 2.5.

Yep.  Exactly same problem in Python 2.6.

This problem does probably exist in all newer versions as well but I 
didn't explicitly test for that.

--
versions: +Python 2.6

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



[issue6367] Change the instruction pointer in python

2009-06-30 Thread Martin v . Löwis

Martin v. Löwis mar...@v.loewis.de added the comment:

So there is a language feature there already that solves your problem
exactly, and you don't want to use it? Exceptions are *exactly* the
right way to provide non-local gotos in a structured manner.

I'm opposed to any change to the language because the desired feature is
already there. Use it. Don't tell that it is the wrong way, it is
exactly the right way.

--

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



[issue6383] error in unicodedata.numeric(u\u2187) and 2188

2009-06-30 Thread Ezio Melotti

Ezio Melotti ezio.melo...@gmail.com added the comment:

Python 2.6 and all the following versions use the Unicode database
version 5.1.0 [1] (unicodedata.unidata_version).

The numeric value is in the database for all the codepoints from U+2185
to U+2188 (included), so the problem shouldn't be there.

[1]: ftp://ftp.unicode.org/Public/5.1.0/ucd/UnicodeData.txt

--
priority:  - normal
versions: +Python 2.7, Python 3.0, Python 3.1

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



[issue6385] two lines of typographical inconsistency in doc of exception class hierarchy

2009-06-30 Thread Georg Brandl

Georg Brandl ge...@python.org added the comment:

Fixed in Pygments trunk.

--
resolution:  - fixed
status: open - closed

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



[issue6383] error in unicodedata.numeric(u\u2187) and 2188

2009-06-30 Thread Amaury Forgeot d'Arc

Amaury Forgeot d'Arc amaur...@gmail.com added the comment:

The _PyUnicode_ToNumeric() function was not in line with the unicode
database.
Here is a new version of this function, together with the script to
generate its code.

--
keywords: +needs review, patch
nosy: +amaury.forgeotdarc
Added file: http://bugs.python.org/file14404/unicode_tonumeric.patch

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



[issue6386] importing yields unexpected results when initial script is a symbolic link

2009-06-30 Thread jbeulich

New submission from jbeulich jbeul...@novell.com:

Due to the way PySys_SetArgv() works, when the initial script is a
symbolic link, importing from normal files in the same directory does
not work. This is particularly surprising when the work tree is a
symlinked clone (cp -s) of an original (i.e. snapshot) tree with a few
modifications (patches) applied to one or more of the modules imported
from: Due the the erratum, the modifications made will appear to not
take effect until one realizes that the wrong module is being imported from.

The solution would in my opinion be to not only add the path left after
the readlink()/realpath() processing to the import search path list, but
also any intermediately encountered ones (in the order processed) as
long as the leaf component continues to be a symlink.

(Note: It seems pointless to use readlink() in the current [3.1 and
earlier] implementation, since the result gets passed to realpath()
anyway. Also, the documentation doesn't seem to mention this behavior,
and from the sources it remains unclear why this processing is needed at
all.)

--
messages: 89914
nosy: jbeulich
severity: normal
status: open
title: importing yields unexpected results when initial script is a symbolic 
link
type: behavior
versions: Python 2.4, Python 2.5, Python 2.6, Python 2.7, Python 3.0, Python 3.1

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



[issue6386] importing yields unexpected results when initial script is a symbolic link

2009-06-30 Thread jan matejek

Changes by jan matejek jmate...@suse.cz:


--
nosy: +matejcik

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



[issue6387] floor division gives different result for int versus float.

2009-06-30 Thread David Jones

New submission from David Jones d...@pobox.com:

Consider: x//y != x//float(y) for some integer values of x and y.

For example, x = 2**54-1, and y = 2:

 x=2**54-1
 y=2
 x//y
9007199254740991L
 x//float(y)
9007199254740992.0
 _==x//y
False

I have no idea whether this should actually be a bug or not.  The 
behaviour (above) _is_ the documented behaviour (because the operands 
are documented as being converted to a common type).  But... I think 
there's a good case for computing the mathematically correct answer 
regardless of the types of the inputs.  For one thing, one of the 
reasons behind introducing the // operator was to make division the same 
regardless of whether the inputs were floating point or int.  Computing 
the mathematically correct answer (which since the answer is an integer 
is always exactly representable in Python) would be better, and simpler 
to document.

--
components: Interpreter Core
messages: 89915
nosy: drj
severity: normal
status: open
title: floor division gives different result for int versus float.
type: behavior
versions: Python 2.6

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



[issue6387] floor division gives different result for int versus float.

2009-06-30 Thread Tim Peters

Tim Peters tim.pet...@gmail.com added the comment:

Do you realize that 2**54-1 isn't exactly representable as a float?  It
requires 54 bits of precision, but the Python float format only has 53
bits available (on all popular boxes).

 2**54-1
18014398509481983L
 float(_)  # rounds to closest representable float
18014398509481984.0

In fact, x//y == x//float(y) for only a small subset of integer x and y
values, mostly because only a small subset of integer x and y values are
exactly representable as floats (given that Python integers enjoy
unbounded precision, but floats only retain 53 bits).

--
nosy: +tim_one

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



[issue6388] platform.python_implementation does not work on IronPython

2009-06-30 Thread Thomas Bleier

New submission from Thomas Bleier tho...@bleier.at:

platform.python_implementation as of CPython 2.6 does not work on
IronPython 2.0.1

It obviously crashes because it fails determining that it run's on
IronPython.

 platform.python_implementation()
Traceback (most recent call last):
  File stdin, line 1, in module
  File C:\IronPython2\Lib\platform.py, line 1409, in python_implementation
  File C:\IronPython2\Lib\platform.py, line 1359, in _sys_version
ValueError: failed to parse CPython sys.version: '2.5.0 (IronPython 2.0
(2.0.0.0) on .NET 2.0.50727.4918)'

--
components: Library (Lib)
messages: 89917
nosy: tbleier
severity: normal
status: open
title: platform.python_implementation does not work on IronPython
type: behavior
versions: Python 2.6

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



[issue6387] floor division gives different result for int versus float.

2009-06-30 Thread David Jones

David Jones d...@pobox.com added the comment:

I do realise that.  I still think the mathematically correct answer should 
be computed, since it can be.

--

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



[issue5313] multiprocessing.process using os.close(sys.stdin.fileno) instead of sys.stdin.close()

2009-06-30 Thread Jesse Noller

Changes by Jesse Noller jnol...@gmail.com:


Removed file: http://bugs.python.org/file14319/stdin-patchv1.patch

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



[issue5313] multiprocessing.process using os.close(sys.stdin.fileno) instead of sys.stdin.close()

2009-06-30 Thread Jesse Noller

Changes by Jesse Noller jnol...@gmail.com:


Removed file: http://bugs.python.org/file14320/0001-Fix-issue-5313.patch

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



[issue6383] error in unicodedata.numeric(u\u2187) and 2188

2009-06-30 Thread Benjamin Peterson

Benjamin Peterson benja...@python.org added the comment:

Wouldn't it make more sense to move this into unicode_db.h?

--
nosy: +benjamin.peterson, loewis

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



[issue6388] platform.python_implementation does not work on IronPython

2009-06-30 Thread Benjamin Peterson

Benjamin Peterson benja...@python.org added the comment:

It should in 2.7, when that is released.

--
nosy: +benjamin.peterson
resolution:  - out of date
status: open - closed

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



[issue6387] floor division gives different result for int versus float.

2009-06-30 Thread R. David Murray

Changes by R. David Murray rdmur...@bitdance.com:


--
nosy: +eric.smith, marketdickinson
priority:  - low

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



[issue6369] binhex buggy in py3k

2009-06-30 Thread Antoine Pitrou

Antoine Pitrou pit...@free.fr added the comment:

Well, failure or success of the current tests seems to rely on the
length of the filename being tested! :-)

--

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



[issue6387] floor division gives different result for int versus float.

2009-06-30 Thread Mark Dickinson

Mark Dickinson dicki...@gmail.com added the comment:

This is definitely a feature request rather than a bug.

As I understand it, you want to special-case floor division so that
if the argument types are (int, float) or (float, int) then the result is 
computed exactly.  Is that correct?  Note that the result of the floor 
division in your examples is a float, so it won't always be able to 
represent the result exactly anyway.  Or are you also proposing to change 
the return type to int/long?  What should (2**55-2)//2.0 return with your 
proposed change, and why?

Why single out floor division for this treatment?  What about the other 
binary operations?

I think this change adds complication to the language semantics without 
giving significant benefits.  It's true that there are a couple of places 
in Python that *do* special-case integers instead of converting to float 
(I'm thinking particularly of int - float comparisons, and math.log), 
but there are good reasons for those special cases and I don't think we 
should add to them.

Big -1 from me, I'm afraid.

--
type: behavior - feature request
versions: +Python 2.7, Python 3.2 -Python 2.6

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



[issue6387] floor division gives different result for int versus float.

2009-06-30 Thread Eric Smith

Eric Smith e...@trueblade.com added the comment:

I agree with Mark: -1.

Do you have any specific use cases where this has caused problems, or is
this academic?

Maybe you can get some support for this on python-ideas, but I suggest
we close it in the meantime.

--

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



[issue6154] Python 3.1 rc1 will not build on OS X 10.5.7 with macports libintl

2009-06-30 Thread Yitz Gale

Changes by Yitz Gale g...@sefer.org:


--
nosy: +ygale

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



[issue6387] floor division gives different result for int versus float.

2009-06-30 Thread Tim Peters

Tim Peters tim.pet...@gmail.com added the comment:

Yup, -1 here too.  For dyadic arithmetic operations (+ - * / % //) on
mixed numeric types, Python's execution model coerces the operands to a
common type before computation begins.  Besides just being the way it's
worked forever in Python, it's consistent and explainable.  Growing a
wart for one case of one case would be inconsistent and deeply
surprising at a higher level.  Live with it ;-)

--

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



[issue6363] __future__ statements break doctest

2009-06-30 Thread Poor Yorick

Poor Yorick pooryor...@users.sourceforge.net added the comment:

It seems that compile does not recognize some flags:

Python 3.1 (r31:73574, Jun 26 2009, 20:21:35) [MSC v.1500 32 bit
(Intel)] on win
32
Type help, copyright, credits or license for more information.
 import __future__
 compile('a=5', 'string', 'single',
__future__.print_function.compiler_flag
)
Traceback (most recent call last):
  File stdin, line 1, in module
ValueError: compile(): unrecognised flags

--

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



[issue6387] floor division gives different result for int versus float.

2009-06-30 Thread R. David Murray

Changes by R. David Murray rdmur...@bitdance.com:


--
resolution:  - rejected
stage:  - committed/rejected
status: open - closed

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



[issue6383] error in unicodedata.numeric(u\u2187) and 2188

2009-06-30 Thread Amaury Forgeot d'Arc

Amaury Forgeot d'Arc amaur...@gmail.com added the comment:

Right. Actually unicodetype_db.h is the one included in unicodectype.c,
I moved my script into makeunicodedata.py.

Here is a new patch. The code generated for _PyUnicode_ToNumeric is the
same as before (except for some tabs), see the old patch if you want to
check the actual changes in the function.

--
Added file: http://bugs.python.org/file14405/unicode-tonumeric-2.patch

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



[issue3955] maybe doctest doesn't understand unicode_literals?

2009-06-30 Thread Christoph Burgmer

Christoph Burgmer cburg...@ira.uka.de added the comment:

This problem seems more severe as the appended test case shows.

That gives me:

Expected:
u'ī'
Got:
u'\u012b'

Both literals are the same.

Unicode literals in doc strings are not treated as other escaped
characters: 

 repr(r'\n')
'n'
 repr('\n')
'\\n'

but:

 repr(ur'\u012b')
u'\\u012b'
 repr(u'\u012b')
u'\\u012b'

So there is no work around in the docstring's reference itself.

I file this here, even though the problems are not strictly equal. I do
believe though that there is or should be a common solution to these
issues. Both results need to be interpreted on a more abstract scale.

--
Added file: http://bugs.python.org/file14406/test.py

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



[issue1293741] doctest runner cannot handle non-ascii characters

2009-06-30 Thread Christoph Burgmer

Christoph Burgmer cburg...@ira.uka.de added the comment:

See attached patch which works for error reporting and verbose output.

--
keywords: +patch
nosy: +christoph
Added file: http://bugs.python.org/file14407/doctest.unicode.patch

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



[issue6363] __future__ statements break doctest

2009-06-30 Thread Poor Yorick

Poor Yorick pooryor...@users.sourceforge.net added the comment:

here is a monkey patch to work around the problem:

import __future__
import doctest
if sys.version_info.major  2:
_extract_future_flags_old = doctest._extract_future_flags
def _extract_future_flags(globs):
flags = _extract_future_flags_old(globs)
flags = flags  ~__future__.division.compiler_flag
flags = flags  ~__future__.absolute_import.compiler_
flags = flags  ~__future__.nested_scopes.compiler_fl
flags = flags  ~__future__.print_function.compiler_f
flags = flags  ~__future__.unicode_literals.compiler
flags = flags  ~__future__.with_statement.compiler_f
return flags
doctest._extract_future_flags = _extract_future_flags

--

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



[issue6367] Change the instruction pointer in python

2009-06-30 Thread vinoth

vinoth 4vin...@gmail.com added the comment:

HI

Exceptions are doing exactly the right way. but what I am telling is a new
way of flow control which no languages currently having.

On Tue, Jun 30, 2009 at 12:14 PM, Martin v. Löwis 
rep...@bugs.python.orgwrote:


 Martin v. Löwis mar...@v.loewis.de added the comment:

 So there is a language feature there already that solves your problem
 exactly, and you don't want to use it? Exceptions are *exactly* the
 right way to provide non-local gotos in a structured manner.

 I'm opposed to any change to the language because the desired feature is
 already there. Use it. Don't tell that it is the wrong way, it is
 exactly the right way.

 --

 ___
 Python tracker rep...@bugs.python.org
 http://bugs.python.org/issue6367
 ___


--
Added file: http://bugs.python.org/file14408/unnamed

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue6367
___HIbrbrExceptions are doing exactly the right way. but what I am telling is 
a new way of flow control which no languages currently having.brbrbrdiv 
class=gmail_quoteOn Tue, Jun 30, 2009 at 12:14 PM, Martin v. Löwis span 
dir=ltrlt;a 
href=mailto:rep...@bugs.python.org;rep...@bugs.python.org/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
Martin v. Löwis lt;a 
href=mailto:mar...@v.loewis.de;mar...@v.loewis.de/agt; added the 
comment:br
br
So there is a language feature there already that solves your problembr
exactly, and you don#39;t want to use it? Exceptions are *exactly* thebr
right way to provide non-local gotos in a structured manner.br
br
I#39;m opposed to any change to the language because the desired feature isbr
already there. Use it. Don#39;t tell that it is the wrong way, it isbr
exactly the right way.br
br
--br
divdiv/divdiv class=h5br
___br
Python tracker lt;a 
href=mailto:rep...@bugs.python.org;rep...@bugs.python.org/agt;br
lt;a href=http://bugs.python.org/issue6367; 
target=_blankhttp://bugs.python.org/issue6367/agt;br
___br
/div/div/blockquote/divbrbr clear=allbr-- brvinbr
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue6347] hpux11.00-parisc: dtoa.c: Failed to find an exact-width 32-bit integer type

2009-06-30 Thread Mark Dickinson

Mark Dickinson dicki...@gmail.com added the comment:

Thanks.  That all seems fairly clear cut:  HP-UX defines everything 
integer-related that C99 expects it to, but puts it in inttypes.h rather 
than stdint.h.  Given that the autoconf tests for uint32_t and friends 
are checking both stdint.h and inttypes.h, and that this problem 
apparently exists on other platforms as well (some versions of Solaris, 
according to the autoconf manual), I think it makes sense to update 
pyport.h to include both stdint.h and inttypes.h.

Patch committed, r73701 (trunk), r73702 (py3k) and r73703 (release31-
maint).  I don't think there's any need to backport to 3.0 or 2.6: 
neither should have this build problem.

--
resolution:  - fixed
status: open - closed
versions: +Python 2.7, Python 3.2

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



[issue6389] os.chmod() documentation refers to non-existent documentation in stat

2009-06-30 Thread Michael

New submission from Michael mhearne...@yahoo.com:

If you look at the documentation for os.chmod(), it says:
mode may take one of the following values (as defined in the stat
module)...

and then lists a number of constants from the stat module (stat.S_ISUID,
stat.S_ISGID, etc.)

I cannot seem to find these constants defined anywhere on the stat
module page.  May I suggest that these constants be defined in the
documentation for os.chmod(), to make it easier on the user?

--
assignee: georg.brandl
components: Documentation
messages: 89932
nosy: georg.brandl, mhearne808
severity: normal
status: open
title: os.chmod() documentation refers to non-existent documentation in stat
versions: Python 2.6

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



[issue6376] description of Decinal.logical_invert is incorrect

2009-06-30 Thread Georg Brandl

Georg Brandl ge...@python.org added the comment:

Fixed in r73704.

--
resolution:  - fixed
status: open - closed

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



[issue6374] Confused by subprocess API documentation

2009-06-30 Thread Georg Brandl

Georg Brandl ge...@python.org added the comment:

Thanks, committed in r73705.

--
resolution:  - accepted
status: open - closed

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



[issue6389] os.chmod() documentation refers to non-existent documentation in stat

2009-06-30 Thread R. David Murray

R. David Murray rdmur...@bitdance.com added the comment:

Since the constants are listed in the os.chmod section of the manual, do
I understand that you are suggesting that the eplanations of the
meanings of the flags from the chmod man page be added to that list?

I observe that in the unix man pages the flags are documented both in
the chmod(2) man page and the stat(2) man page, with somewhat different
text.  I'm not sure this informational redundancy is good...and I'd be
inclined to put the docs in the stat module docs where the flags are
actually defined.  They will then be hotlinked from the flag list in
os.chmod.

--
keywords: +easy
nosy: +r.david.murray
priority:  - normal
stage:  - needs patch
type:  - feature request
versions: +Python 2.7, Python 3.1, Python 3.2

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



[issue6384] Permalink to built-in exception class hierarchy documentation

2009-06-30 Thread Georg Brandl

Georg Brandl ge...@python.org added the comment:

I added a new heading there in r73706.

--
resolution:  - fixed
status: open - closed

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



[issue6389] os.chmod() documentation refers to non-existent documentation in stat

2009-06-30 Thread Georg Brandl

Georg Brandl ge...@python.org added the comment:

I agree with David.

--

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



[issue1367628] use PyOS_ReadlineFunctionPointer in non-interractive input

2009-06-30 Thread Amaury Forgeot d'Arc

Amaury Forgeot d'Arc amaur...@gmail.com added the comment:

Isn't the same functionality already implemented by code.interact()?

--
nosy: +amaury.forgeotdarc
resolution:  - rejected
status: open - pending

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



[issue1388872] Polymorphic getters / setters

2009-06-30 Thread Amaury Forgeot d'Arc

Amaury Forgeot d'Arc amaur...@gmail.com added the comment:

This is normal behavior: the property is created with the functions
created just above, even before they belong to any class.

To make the property search the class hierarchy, you could write: 
  foo = property(lambda x: x.get_foo(), lambda x, v: x.set_foo(v))

or make it a function:
  def polymorphic_property(getter, setter):
  return property(lambda x  : getattr(x, getter)(),
  lambda x,v: getattr(x, setter)(v))
  [...]
  foo = polymorphic_property('get_foo', 'set_foo')

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

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



[issue6371] Minor internal link errors in Optparse doc

2009-06-30 Thread Georg Brandl

Georg Brandl ge...@python.org added the comment:

Thanks, fixed in r73707.

--
resolution:  - fixed
status: open - closed

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



[issue6390] File reads past EOF in w+b mode

2009-06-30 Thread Brian Mearns

New submission from Brian Mearns bmea...@ieee.org:

Open a file in w+b mode: if you write to the file, then read from it
without seeking backward, it reads past the EOF, apparently out into
memory, which could be a pretty bad security concern. Have not checked
if w+ mode does the same.

### Bad behavior...
 fid = open(temp, w+b)
 fid.read()
''
 fid.write(foobar)
#Read while positioned on EOF
 fid.read(10)
'\xc2\x00\x00\x00\x00\x00\x00\x00\x00\x00'
 fid.seek(0)
 fid.read(10)
'foobar\xc2\x00\x00\x00'
 fid.close()

###Correct behavior after seeking backwards:
 fid = open(temp2, w+b)
 fid.read()
''
 fid.write(foobar)
 fid.seek(0)
 fid.read(10)
'foobar'
 fid.close()

Interestingly, it appears that any seek works, you don't necessarily
have to go backwards:

 fid = open(temp2, w+b)
 fid.write(foobar)
 fid.tell()
6L
 fid.seek(6)
 fid.read()
''

--
components: IO
messages: 89941
nosy: bmearns
severity: normal
status: open
title: File reads past EOF in w+b mode
type: security
versions: Python 2.6

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



[issue6390] File reads past EOF in w+b mode

2009-06-30 Thread Amaury Forgeot d'Arc

Amaury Forgeot d'Arc amaur...@gmail.com added the comment:

Yes, see the discussion in issue3207, specially this part:

http://www.cplusplus.com/reference/clibrary/cstdio/fopen.html

For the modes where both read and writing (or appending) are allowed
(those which include a + sign), the stream should be flushed (fflush)
or repositioned (fseek, fsetpos, rewind) between either a reading
operation followed by a writing operation or a writing operation
followed by a reading operation.


Python 2.x relies on the fopen functions to implement files, and
inherits this behavior.
Python 3.x has a completely new implementation and doesn't have this
problem.

--
nosy: +amaury.forgeotdarc
resolution:  - wont fix
status: open - closed

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



[issue5313] multiprocessing.process using os.close(sys.stdin.fileno) instead of sys.stdin.close()

2009-06-30 Thread Jesse Noller

Jesse Noller jnol...@gmail.com added the comment:

Committed in r73708 on trunk

--
resolution:  - fixed
status: open - closed

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



[issue5155] Multiprocessing.Queue created by sub-process fails when used in sub-sub-process (bad file descriptor in q.get())

2009-06-30 Thread Jesse Noller

Jesse Noller jnol...@gmail.com added the comment:

Committed in r73708 on trunk

--
resolution:  - fixed
status: open - closed

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



[issue5331] multiprocessing hangs when Pool used within Process

2009-06-30 Thread Jesse Noller

Jesse Noller jnol...@gmail.com added the comment:

Committed in r73708 on trunk

--
resolution:  - fixed
status: open - closed

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



[issue6383] error in unicodedata.numeric(u\u2187) and 2188

2009-06-30 Thread Vernon Cole

Vernon Cole vernondc...@gmail.com added the comment:

Wow! Quick response! My outstanding bug on IronPython has been hanging out
there since August of last year.
  I don't really want to try compiling the standard library on my laptop,
but I do want to fully test my code soon. What is the first place I can
expect to see this in binary form? 3.2 alpha?
--
Vernon

On Tue, Jun 30, 2009 at 8:28 AM, Amaury Forgeot d'Arc 
rep...@bugs.python.org wrote:


 Amaury Forgeot d'Arc amaur...@gmail.com added the comment:

 Right. Actually unicodetype_db.h is the one included in unicodectype.c,
 I moved my script into makeunicodedata.py.

 Here is a new patch. The code generated for _PyUnicode_ToNumeric is the
 same as before (except for some tabs), see the old patch if you want to
 check the actual changes in the function.

 --
 Added file: http://bugs.python.org/file14405/unicode-tonumeric-2.patch

 ___
 Python tracker rep...@bugs.python.org
 http://bugs.python.org/issue6383
 ___


--
Added file: http://bugs.python.org/file14409/unnamed

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue6383
___Wow! Quick response! My outstanding bug on IronPython has been hanging out 
there since August of last year. br  I don#39;t really want to try 
compiling the standard library on my laptop, but I do want to fully test my 
code soon. What is the first place I can expect to see this in binary form? 3.2 
alpha?br
--brVernonbrbrdiv class=gmail_quoteOn Tue, Jun 30, 2009 at 8:28 AM, 
Amaury Forgeot d#39;Arc span dir=ltrlt;a 
href=mailto:rep...@bugs.python.org;rep...@bugs.python.org/agt;/span 
wrote:brblockquote class=gmail_quote style=border-left: 1px solid 
rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;
div class=imbr
Amaury Forgeot d#39;Arc lt;a 
href=mailto:amaur...@gmail.com;amaur...@gmail.com/agt; added the 
comment:br
br
/divRight. Actually unicodetype_db.h is the one included in 
unicodectype.c,br
I moved my script into makeunicodedata.py.br
br
Here is a new patch. The code generated for _PyUnicode_ToNumeric is thebr
same as before (except for some tabs), see the old patch if you want tobr
check the actual changes in the function.br
br
--br
Added file: a 
href=http://bugs.python.org/file14405/unicode-tonumeric-2.patch; 
target=_blankhttp://bugs.python.org/file14405/unicode-tonumeric-2.patch/abr
divdiv/divdiv class=h5br
___br
Python tracker lt;a 
href=mailto:rep...@bugs.python.org;rep...@bugs.python.org/agt;br
lt;a href=http://bugs.python.org/issue6383; 
target=_blankhttp://bugs.python.org/issue6383/agt;br
___br
/div/div/blockquote/divbr
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue6383] error in unicodedata.numeric(u\u2187) and 2188

2009-06-30 Thread Martin v . Löwis

Martin v. Löwis mar...@v.loewis.de added the comment:

Notice that this is a duplicate of the longstanding issue1571184, which
has a patch that is more comprehensive than the one proposed here. So
rather than accepting Amaury's patch, I'd prefer to see Anders' patch
reviewed, and revised as necessary.

--
dependencies: +Generate numeric/space/linebreak from Unicode database.

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



[issue6391] Incorrect description of unittest.TestCase.run

2009-06-30 Thread En-Ran Zhou

New submission from En-Ran Zhou zho...@gmail.com:

In Python 2.6 Document, Library reference 26.3 unittest
(http://docs.python.org/library/unittest.html#unittest.TestCase.run)
The description of TestCase.run method says that ``If result is omitted
or None, a temporary result object is created (by calling the
defaultTestCase() method) and used'', but I think it should be
defaultTestResult() instead of defaultTestCase().

--
assignee: georg.brandl
components: Documentation
messages: 89948
nosy: georg.brandl, zhouer
severity: normal
status: open
title: Incorrect description of unittest.TestCase.run
versions: Python 2.6, Python 2.7

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



[issue6383] error in unicodedata.numeric(u\u2187) and 2188

2009-06-30 Thread Amaury Forgeot d'Arc

Amaury Forgeot d'Arc amaur...@gmail.com added the comment:

Yes, my patch is entirely contained in the one from issue1571184.
I mark this one as a duplicate, and will review and update the other.

--
dependencies:  -Generate numeric/space/linebreak from Unicode database.
resolution:  - duplicate
status: open - closed
superseder:  - Generate numeric/space/linebreak from Unicode database.

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



[issue6391] Incorrect description of unittest.TestCase.run

2009-06-30 Thread Ezio Melotti

Ezio Melotti ezio.melo...@gmail.com added the comment:

 class MyTest(TestCase):
...   def runTest(self): pass
...   def defaultTestCase(self):
... print('defaultTestCase called')
...
 test = MyTest()
 test.run()
 class MyTest(TestCase):
...   def runTest(self): pass
...   def defaultTestResult(self):
... print('defaultTestResult called')
...
 test = MyTest()
 test.run()
defaultTestResult called
Traceback (most recent call last):
  File stdin, line 1, in module
  File C:\Programmi\Python31\lib\unittest.py, line 461, in run
result.startTest(self)
AttributeError: 'NoneType' object has no attribute 'startTest'

I think you are right, here only defaultTestResult called is printed
(just before the traceback). Also there's no doc about
defaultTestCase(). The doc can also be clearer about 'result object',
possibly replacing that part with 'a temporary TestResult instance'.

--
assignee: georg.brandl - ezio.melotti
nosy: +ezio.melotti
priority:  - normal
versions: +Python 3.0, Python 3.1

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



[issue5801] spurious empty lines in wsgiref code

2009-06-30 Thread Pablo Torres Navarrete

Pablo Torres Navarrete tn.pa...@gmail.com added the comment:

I cleaned the rest of the module by shortening lines that are too long,
removing useless blocks of empty lines and adding whitespace around
operators and after commas.  Nothing in the programming logic was changed.

--
Added file: http://bugs.python.org/file14410/wsgiref-patch

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



[issue5801] spurious empty lines in wsgiref code

2009-06-30 Thread Pablo Torres Navarrete

Pablo Torres Navarrete tn.pa...@gmail.com added the comment:

The patch applies to rev 73702 of the py3k branch.

--

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



[issue5801] spurious empty lines in wsgiref code

2009-06-30 Thread Pablo Torres Navarrete

Pablo Torres Navarrete tn.pa...@gmail.com added the comment:

Oops, forgot to add the .diff extension so web browsers don't get
confused.  Their contents are the same though.

--
keywords: +patch
Added file: http://bugs.python.org/file14411/wsgiref-patch.diff

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



[issue1571184] Generate numeric/space/linebreak from Unicode database.

2009-06-30 Thread Vernon Cole

Vernon Cole vernondc...@gmail.com added the comment:

Adding Python 2.6 to the list of affected versions - as that is where I
found the bug reported in issue 6383 (now superseded by this one.)

--
nosy: +vernondcole
versions: +Python 2.6, Python 3.0

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



[issue6391] Incorrect description of unittest.TestCase.run

2009-06-30 Thread Ezio Melotti

Ezio Melotti ezio.melo...@gmail.com added the comment:

Fixed in r73712.
I left result object because the object can also be a subclass of
TestResult. I also changed the last part to clarify that the result
object is never returned to the caller, even when it's passed to run().

Thanks!

--
resolution:  - fixed
stage:  - committed/rejected
status: open - closed

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



[issue1571184] Generate numeric/space/linebreak from Unicode database.

2009-06-30 Thread Ezio Melotti

Changes by Ezio Melotti ezio.melo...@gmail.com:


--
nosy: +ezio.melotti

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



[issue6312] httplib fails with HEAD requests to pages with transfer-encoding: chunked

2009-06-30 Thread Ezio Melotti

Changes by Ezio Melotti ezio.melo...@gmail.com:


--
stage:  - patch review

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



[issue5388] Green-box doc glitch: winhelp version only

2009-06-30 Thread Ezio Melotti

Ezio Melotti ezio.melo...@gmail.com added the comment:

This is what I see here (see attached image). The only scrollbar is the
one at the bottom for the whole page. The file is under Start -
Programs - Python 3.1 - Python Manuals, and the path/file is
C:\Programs\Python31\Doc\python31.chm (you can see it right-clicking on
it from start menu and selecting properties).

I'm using WinXP SP2, the versions of the HTML Help Components are:
HHCTRL.OCX 5.02.3790.2453
ITSS.DLL   5.02.3790.2453
ITIRCL.DLL 5.02.3790.2453
HHA.DLL4.74.8702.0

Compiled with HHA Version 4.74.8702

You can find this information right-clicking on WinHelp in the
application bar (or on the small icon on the left of the title bar) and
then on Version Maybe you are running an older (or newer) version
of WinHelp.

Tomorrow I'll check with some other Windows.

--
Added file: http://bugs.python.org/file14412/py31doc.png

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



[issue6326] Add a swap method to list

2009-06-30 Thread Adam Olsen

Adam Olsen rha...@gmail.com added the comment:

Fix it at its source: patch your database engine to use the type you
want.  Or wrap the list without subclassing (__iter__ may be the only
method you need to wrap).

Obscure performance hacks don't warrant language extensions.

--
nosy: +Rhamphoryncus

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



[issue1571184] Generate numeric/space/linebreak from Unicode database.

2009-06-30 Thread Amaury Forgeot d'Arc

Amaury Forgeot d'Arc amaur...@gmail.com added the comment:

Here is a refreshed version of the patch, without the generated files.
The patch combines several changes which are fairly independent from 
each other:

- Using the unicode database to generate the functions adds 143 new 
codepoints to PyUnicode_ToNumeric, and one codepoint to 
PyUnicode_IsWhitespace.

- In addition, PyUnicode_ToNumeric now contains code for all numerics; 
previously those which are also digits fell in the 'default:' case and 
were converted with PyUnicode_ToDigit(). This adds 468 new codepoints, 
but removes the need to call PyUnicode_ToDigit()

- The Unihan.txt files (two files to download, 25Mb each) are now 
parsed, and this adds 73 more codepoints to PyUnicode_ToNumeric. (There 
are now 1009 entries in this function.)
The 3.2.0 version of this file contains two huge numbers: 1e16 and 1e20, 
I had to widen the type of 'change_record.numeric_changed' from 'int' to 
'double'.  It is possible that these were removed from the Unicode 
database between versions 4.1 and 5.1.

- the database has a new flag, NUMERIC_MASK, used by 
PyUnicode_IsNumeric.  This adds ~350 lines in the arrays of numbers in 
unicodetype_db.h

If this patch is accepted, the md5 checksum in test_unicodedata.py will 
need to change.

--
nosy: +amaury.forgeotdarc
Added file: http://bugs.python.org/file14413/unicodedata-2.7.patch

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



[issue6326] Add a swap method to list

2009-06-30 Thread Kristján Valur Jónsson

Kristján Valur Jónsson krist...@ccpgames.com added the comment:

fyi, here is the thread from python-ideas:

http://mail.python.org/pipermail/python-ideas/2009-June/005042.html

The parallel to C++´s future rvalue reference is interesting 
(http://www.artima.com/cppsource/rvalue.html, see the move 
application) 

Especially, perhaps, in light of this quote from 
http://evanjones.ca/rvalue-references.html, criticising the concept:

...Or add a swap member function. This is not elegant nor is it as 
general. However, this is what we've been using for decades. It also 
requires zero changes to C++ compilers, and requires users to learn 
nothing. It has been immortalized in books like Effective C++ (Item 25: 
Consider support for a non-throwing swap).

This, incidentally, is where the name 'swap' comes from, me being an old 
C++ programmer.

--

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



[issue5555] optparse

2009-06-30 Thread Greg Ward

Greg Ward g...@gerg.ca added the comment:

 This is an edited-down excerpt form the optparse documentation from:
 
 http://docs.python.org/library/optparse.html
 
 ... the traditional Unix syntax is a hyphen (“-“) followed by a 
 single letter [...] Some other option syntaxes that the world has seen
include:
* a hyphen followed by a few letters, e.g. -pf [...]

Note that the second [...] expands to (this is *not* the same as
multiple options merged into a single argument).  Which means:

1) optparse *does* implement the traditional Unix option-munging that
has been around since at least the mid-1980s
2) the proposed statement optparse has chosen to implement a subset of
the GNU coding standard's command line interface guidelines, allowing
for both long and short options, but not the POSIX-style concatenation
of short options. is false

Offhand, I don't see a way for the documentation to be any clearer. 
Maybe an example of -a and -b munged to -ab?

--

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



[issue5555] optparse: clarify option concatenation in docs

2009-06-30 Thread Greg Ward

Changes by Greg Ward g...@gerg.ca:


--
title: optparse - optparse: clarify option concatenation in docs

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



[issue5388] Green-box doc glitch: winhelp version only

2009-06-30 Thread Terry J. Reedy

Terry J. Reedy tjre...@udel.edu added the comment:

Same path to python31.chm.
I presume color difference is due to difference selections in
Display Properties / Appearance tab.

When I left- or right-click on upper-left icon as depicted in screen
capture, choices are move, resize, , close, About HTML Help. No
Versions. Result of selecting last is popup window

About Microsoft HTML Help. 
Html Help Control Version 5.2.3790.4110
Copyright blah blah

Ditto for right-click on entry in task bar as bottom of screen.

Other programs use the same control.

We are obviously running different 'help' programs. WinHelp versus HTML
Help? I wonder if it has anything to do with vendor customization. My XP
Home is from HP. However, wife's machine from Dell with XP Pro uses the
same version of same control for help with various programs also.

My machine does have winhelp.exe (with pure ? icon instead of ? and
page) and winhelp32.exe (with ? on book cover icon), but they are not
listed in programs / accessories. Latter does not recognize python31.chm
as a help file. The former looks for .hlp files.

--

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



[issue6392] IDLE 3.1 will not open

2009-06-30 Thread Matt

New submission from Matt matthall.oxf...@gmail.com:

IDLE will not open; it does not give an error or even appear on the 
process list.

I am using Windows XP on an IBM Thinkpad. I tried the prescribed 
solution on Issue 4049, and it returned this message:

Microsoft Windows XP [Version 5.1.2600]
(C) Copyright 1985-2001 Microsoft Corp.

C:\Documents and Settings\Mattcd \python31

C:\Python31python.exe Lib\idlelib\idle.py
Traceback (most recent call last):
  File Lib\idlelib\idle.py, line 11, in module
idlelib.PyShell.main()
  File C:\Python31\Lib\idlelib\PyShell.py, line 1374, in main
root = Tk(className=Idle)
  File C:\Python31\Lib\tkinter\__init__.py, line 1632, in __init__
self.tk = _tkinter.create(screenName, baseName, className, 
interactive, want
objects, useTk, sync, use)
_tkinter.TclError: Can't find a usable init.tcl in the following 
directories:
{C:\IBMTOOLS\Python22\tcl\tcl8.4} C:/IBMTOOLS/Python22/tcl/tcl8.5 
C:/Python3
1/lib/tcl8.5 C:/lib/tcl8.5 C:/lib/tcl8.5 C:/library C:/library 
C:/tcl8.5.2/libra
ry C:/tcl8.5.2/library

C:/IBMTOOLS/Python22/tcl/tcl8.4/init.tcl: version conflict for 
package Tcl: ha
ve 8.5.2, need exactly 8.4
version conflict for package Tcl: have 8.5.2, need exactly 8.4
while executing
package require -exact Tcl 8.4
(file C:/IBMTOOLS/Python22/tcl/tcl8.4/init.tcl line 19)
invoked from within
source C:/IBMTOOLS/Python22/tcl/tcl8.4/init.tcl
(uplevel body line 1)
invoked from within
uplevel #0 [list source $tclfile]


This probably means that Tcl wasn't installed properly.


C:\Python31

I am very new to Python (and programming in general), and I have no 
idea how to fix this.

By the way, I did install the program for all users.

--
components: IDLE
messages: 89962
nosy: matthall
severity: normal
status: open
title: IDLE 3.1 will not open
type: behavior
versions: Python 3.1

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