Mark Dickinson added the comment:
There's no bug here: as Steven explained, this is simply the result of the
usual arithmetic conversions when performing a mixed-type operation.
Python should multiply a complex by a non-complex in the simple way
I think this would just be adding unnecessary
Changes by Serhiy Storchaka storch...@gmail.com:
--
resolution: - rejected
stage: - resolved
status: pending - closed
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue11204
___
Chris,
Thanks for the tip on the function. I was not aware of that function, Grin.
Creating the function as you mention makes a lot of sense.
I am doing a lot of little bits and pieces focusing on things I need to
eventually build a script that is going to compile data from a router and
On Sat, Jan 4, 2014 at 8:52 PM, Sean Murphy mhysnm1...@gmail.com wrote:
Thanks for the tip on the function. I was not aware of that function, Grin.
Creating the function as you mention makes a lot of sense.
I am doing a lot of little bits and pieces focusing on things I need to
eventually
On 01/03/2014 08:03 PM, Sean Murphy wrote:
Hello all.
This is a newly question. But I wish to understand why the below code is
providing different results.
import os, sys
if len(sys.argv) 2:
filenames = sys.argv[1:]
else
print (no parameters provided\n)
sys.edit()
for filename in
On 01/03/2014 10:32 PM, Sean Murphy wrote:
Hi everyone.
[snip]
The 2nd part of my original question still stands. I will expand upon this a bit more to
give more context. I want to print from the beginning of the paragraph to the end. Each
paragraph ends with \n\n\n.
If I use \n\n\n in
Hello all.
This is a newly question. But I wish to understand why the below code is
providing different results.
import os, sys
if len(sys.argv) 2:
filenames = sys.argv[1:]
else
print (no parameters provided\n)
sys.edit()
for filename in filenames:
print (filename is: %s\n
On Fri, Jan 3, 2014 at 11:03 PM, Sean Murphy mhysnq1...@icloud.com wrote:
Hello all.
This is a newly question. But I wish to understand why the below code is
providing different results.
import os, sys
if len(sys.argv) 2:
filenames = sys.argv[1:]
else
print (no parameters
On Sat, Jan 4, 2014 at 3:03 PM, Sean Murphy mhysnq1...@icloud.com wrote:
filenames = sys.argv[1:]
for filename in filenames:
print (filename is: %s\n %filename)
versus
filenames = sys.argv[1]
for filename in filenames:
print (filename is: %s\n % filename)
The first one is
On 04/01/2014 04:03, Sean Murphy wrote:
Hello all.
This is a newly question. But I wish to understand why the below code is
providing different results.
import os, sys
if len(sys.argv) 2:
filenames = sys.argv[1:]
else
print (no parameters provided\n)
sys.edit()
for filename in
Thanks everyone.
Mark thanks for the correction on the ':'. Since I didn't cut and copy, rather
typed it out. Errors crept in. :-)
another question in relation to slicing strings. If you want to get a single
character, just using the index position will get it. If I use the following,
Hi everyone.
Worked out what I was doing wrong with the string splicing. The offset number
was lower then the index number, so it was failing. E.G:
On 04/01/2014, at 4:54 PM, Sean Murphy mhysnm1...@gmail.com wrote:
Thanks everyone.
Mark thanks for the correction on the ':'. Since I
On Sat, Jan 4, 2014 at 5:32 PM, Sean Murphy mhysnm1...@gmail.com wrote:
So I suspect the offset number still starts at the beginning of the string
and counts forward or another way to look at it you are slicing from element
x to element y. If element y is less then element x, return nothing.
On 04Jan2014 16:54, Sean Murphy mhysnm1...@gmail.com wrote:
Thanks everyone.
Mark thanks for the correction on the ':'. Since I didn't cut and copy,
rather typed it out. Errors crept in. :-)
another question in relation to slicing strings. If you want to get a single
character, just
Roundup Robot added the comment:
New changeset 5d078b0bae75 by Victor Stinner in branch 'default':
Issue #19787: PyThread_set_key_value() now always set the value
http://hg.python.org/cpython/rev/5d078b0bae75
--
___
Python tracker
Changes by STINNER Victor victor.stin...@gmail.com:
--
resolution: - fixed
status: open - closed
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue19787
___
Changes by STINNER Victor victor.stin...@gmail.com:
--
title: tracemalloc: set_reentrant() should not have to call
PyThread_delete_key() - Fix PyThread_set_key_value() strange behaviour
___
Python tracker rep...@bugs.python.org
http
STINNER Victor added the comment:
Oh, my change on PyThread_set_key_value() has an unexpected effect on
_testcapi.run_in_subinterp(): it now fixes the Python thread state.
Py_NewInterpreter() creates a second Python thread state for the current
thread, but PyThread_set_key_value() ignored the
STINNER Victor added the comment:
My commit broke test_capi, so I revert it. Here is the commit as a patch.
The impact on subinterpreters is more complex than what I expected. A decision
should be take on what to do: mimic behaviour of Python 3.3 for subinterpreters
(don't replace the Python
Changes by Serhiy Storchaka storch...@gmail.com:
--
status: open - pending
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue11204
___
___
Le 23/07/2013 17:25, Steven D'Aprano a écrit :
On Tue, 23 Jul 2013 13:42:13 +0200, Vincent Vande Vyvre wrote:
On Windows a script where de endline are the system line sep, the files
are open with a double line in Eric4, Notepad++ or Gedit but they are
correctly displayed in the MS Bloc-Notes.
On Wed, Jul 24, 2013 at 5:02 PM, Vincent Vande Vyvre
vincent.vandevy...@swing.be wrote:
In fact, in my code, the original file is open in binary mode, the line
separator is translate to \n and it is parsed by the module tokenise.
I'm not a Windows user but my code must be run also on Win, this
On 7/23/2013 7:41 PM, Dennis Lee Bieber wrote:
On 23 Jul 2013 15:25:12 GMT, Steven D'Aprano
steve+comp.lang.pyt...@pearwood.info declaimed the following:
On Tue, 23 Jul 2013 13:42:13 +0200, Vincent Vande Vyvre wrote:
On Windows a script where de endline are the system line sep, the files
are
On Tue, 23 Jul 2013 13:42:13 +0200, Vincent Vande Vyvre wrote:
On Windows a script where de endline are the system line sep, the files
are open with a double line in Eric4, Notepad++ or Gedit but they are
correctly displayed in the MS Bloc-Notes.
I suspect the problem lies with Eric4,
On Windows a script where de endline are the system line sep, the files
are open with a double line in Eric4, Notepad++ or Gedit but they are
correctly displayed in the MS Bloc-Notes.
Example with this code:
--
# -*- coding: utf-8 -*-
import os
On Tue, Jul 23, 2013 at 7:42 AM, Vincent Vande Vyvre
vincent.vandevy...@swing.be wrote:
On Windows a script where de endline are the system line sep, the files
are open with a double line in Eric4, Notepad++ or Gedit but they are
correctly displayed in the MS Bloc-Notes.
Example with this
Le 23/07/2013 14:39, Jason Swails a écrit :
On Tue, Jul 23, 2013 at 7:42 AM, Vincent Vande Vyvre
vincent.vandevy...@swing.be mailto:vincent.vandevy...@swing.be wrote:
On Windows a script where de endline are the system line sep, the
files are open with a double line in Eric4,
Le 23/07/2013 15:10, Vincent Vande Vyvre a écrit :
The '\n' are in the original file.
I've tested these other versions:
---
def write():
strings = ['# -*- coding: utf-8 -*-\n',
'import os\n',
'import sys\n']
with
On Tue, Jul 23, 2013 at 9:26 AM, Vincent Vande Vyvre
vincent.vandevy...@swing.be wrote:
Le 23/07/2013 15:10, Vincent Vande Vyvre a écrit :
The '\n' are in the original file.
I've tested these other versions:
--**-
def write():
strings = ['# -*- coding:
]
[2]
but I get:
[1]
[1, 2]
Bug? (If not, I'd *love* to read the rationale for this behaviour...)
--
messages: 190557
nosy: bsdphk
priority: normal
severity: normal
status: open
title: Strange behaviour with default list argument
type: behavior
versions: Python 2.7, Python 3.2
Eric V. Smith added the comment:
It's by design. Search for mutable default arguments, for example
http://docs.python-guide.org/en/latest/writing/gotchas.html#mutable-default-arguments
--
nosy: +eric.smith
resolution: - invalid
stage: - committed/rejected
status: open - closed
Barry A. Warsaw added the comment:
While it's true that it can be confusing to users, it's not a bug.
http://docs.python.org/2/reference/compound_stmts.html#function
and a nice treatise on the subject by the Effbot:
http://effbot.org/zone/default-values.htm
--
nosy: +barry
Changes by Roy Smith r...@panix.com:
--
nosy: +roysmith
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue11204
___
___
Python-bugs-list mailing list
Serhiy Storchaka added the comment:
Then let's leave all as is.
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue11204
___
___
Python-bugs-list
Changes by Serhiy Storchaka storch...@gmail.com:
--
components: +Library (Lib), Regular Expressions
nosy: +mrabarnett
type: - behavior
versions: +Python 3.2, Python 3.3, Python 3.4 -Python 3.1
___
Python tracker rep...@bugs.python.org
Matthew Barnett added the comment:
Interesting.
In my regex module (http://pypi.python.org/pypi/regex) I have:
bool(regex.match(pat, bb, regex.VERBOSE)) # True
bool(regex.match(pat, b{1,3}, regex.VERBOSE)) # False
because I thought that when the VERBOSE flag is turned on it should ignore
Serhiy Storchaka added the comment:
$ echo 'baaa' | grep -o 'b\{1,3\}a'
bbba
$ echo 'baaa' | grep -o 'b\{1, 3\}a'
grep: Invalid content of \{\}
$ echo 'baaa' | egrep -o 'b{1,3}a'
bbba
$ echo 'baaa' | egrep -o 'b{1, 3}a'
$ echo 'bbb{1, 3}aa' | LC_ALL=C egrep -o 'b{1, 3}a'
b{1, 3}a
Matthew Barnett added the comment:
The question is whether re should always treat 'b{1, 3}a' as a literal, even
with the VERBOSE flag.
I've checked with Perl 5.14.2, and it agrees with re: adding a space _always_
makes it a literal, even with the 'x' flag (/b{1, 3}a/x is treated as
: jsevilleja
priority: normal
severity: normal
status: open
title: Strange behaviour of python cmd module. (Ignores slash)
type: behavior
versions: Python 2.7
Added file: http://bugs.python.org/file26012/shell.py
___
Python tracker rep...@bugs.python.org
http
Peter Otten __pete...@web.de added the comment:
Not a python bug. You are ommitting an important detail of the stackoverflow
example in your code:
# we want to treat '/' as part of a word, so override the delimiters
readline.set_completer_delims(' \t\n;')
Please turn to the Python mailing
Changes by Ned Deily n...@acm.org:
--
resolution: - invalid
status: open - closed
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue15074
___
___
STINNER Victor victor.stin...@haypocalc.com added the comment:
It should be related to #6203.
--
nosy: +haypo
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue12699
___
', 'UTF-8')
We feel this is strange!
--
messages: 141683
nosy: alexis, feth
priority: normal
severity: normal
status: open
title: strange behaviour of locale.getlocale() - None, None
versions: Python 2.7
___
Python tracker rep...@bugs.python.org
http
Changes by Ned Deily n...@acm.org:
--
resolution: - duplicate
stage: - committed/rejected
status: open - closed
superseder: - 3.x locale does not default to C, contrary to the
documentation and to 2.x behavior
___
Python tracker
On Wednesday 25 May 2011 06:27:52 sunrrrise wrote:
Ok, another time I'd like to thank you for your help. I gave
up, I'm going to get used to IDLE GUI... at least this one
works!
With IDLE, after any changes to the program, you are asked to
save file. IDLE knows that a file in python needs to
Ok, another time I'd like to thank you for your help. I gave up, I'm going to
get used to IDLE GUI... at least this one works!
--
http://mail.python.org/mailman/listinfo/python-list
Hello,
I have checked another computer (WinXP, 32b) with Komodo Edit 6.1 and
ActiveState Python 3.2 - problem still occurs.
Have you received my email?
s.
--
http://mail.python.org/mailman/listinfo/python-list
On Tue, May 24, 2011 at 1:44 AM, Aleksander Pietkiewicz
sunrrr...@gmail.com wrote:
Hello,
I have googled your email address, I hope it is not a problem.
Thank you for your help!
I figured you would get it from my post, but either way works! My
email address is fairly well known. Sorry for the
Hello,
this is my first post. I'm trying to learn Python language which I find great,
but I have a big problem with its editors/IDEs.
I have tested IDLE (which installed with Python3 from ActiveState), Notepad++
and finally Komodo EDIT. I don't like IDLE GUI, but Notepad++ and Komodo EDIT
On Mon, May 23, 2011 at 8:43 AM, sunrrrise sunrrr...@gmail.com wrote:
Hello,
this is my first post. I'm trying to learn Python language which I find
great, but I have a big problem with its editors/IDEs.
Welcome!
b to: Wprowadz zmienna b: 2
This looks wrong. Are you copying and pasting
Thank you for quick response!
English is not my native language so I'm going to keep my explanations simple.
This really simple script asks me for two variables called a and b. For
example, I type 4 for a and 3 for b and IDLE gives me that:
Wprowadz zmienna a: 4
Wprowadz zmienna b: 3
a to: 4
On Mon, May 23, 2011 at 8:59 AM, sunrrrise sunrrr...@gmail.com wrote:
Thank you for quick response!
English is not my native language so I'm going to keep my explanations simple.
No problem, your English is far better than my Polish. (I used Google
Translate to figure out what Wprowadz zmienna
Hi and please help me understand if it is a bug, or..,as someone said, there's
a 'bug' in my understanding:
(Python 3.2 (r32:88445, Feb 20 2011, 21:29:02) [MSC v.1500 32 bit (Intel)] on
win32) (windows vista, the regular windows python installer)
It's about the following code:
while True:
s
On 3/7/2011 11:43 AM, Victor Paraschiv wrote:
Hi and please help me understand if it is a bug, or..,as someone said,
there's a 'bug' in my understanding:
(Python 3.2 (r32:88445, Feb 20 2011, 21:29:02) [MSC v.1500 32 bit
(Intel)] on win32) (windows vista, the regular windows python installer)
Changes by Terry J. Reedy tjre...@udel.edu:
--
nosy: +ezio.melotti, pitrou
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue11204
___
___
(re.match(pat2, b{1, 3})) # True
and this is not prevented by the suggested changes.
--
messages: 128472
nosy: sjmachin
priority: normal
severity: normal
status: open
title: re module: strange behaviour of space inside {m, n}
versions: Python 2.7, Python 3.1
Hi all,
hope you can help me understanding why the following happens:
In [213]: g = {'a': ['a1','a2'], 'b':['b1','b2']}
In [214]: rg = dict.fromkeys(g.keys(),[])
In [215]: rg
Out[215]: {'a': [], 'b': []}
In [216]: rg['a'].append('x')
In [217]: rg
Out[217]: {'a': ['x'], 'b': ['x']}
What I meant
On Tue, Nov 9, 2010 at 3:14 PM, Ciccio franap...@gmail.com wrote:
Hi all,
hope you can help me understanding why the following happens:
In [213]: g = {'a': ['a1','a2'], 'b':['b1','b2']}
In [214]: rg = dict.fromkeys(g.keys(),[])
The argument you pass which is used to fill the values of the
Ciccio wrote:
Hi all,
hope you can help me understanding why the following happens:
In [213]: g = {'a': ['a1','a2'], 'b':['b1','b2']}
In [214]: rg = dict.fromkeys(g.keys(),[])
In [215]: rg
Out[215]: {'a': [], 'b': []}
In [216]: rg['a'].append('x')
In [217]: rg
Out[217]: {'a': ['x'], 'b':
On 2:59 PM, Ciccio wrote:
Hi all,
hope you can help me understanding why the following happens:
In [213]: g = {'a': ['a1','a2'], 'b':['b1','b2']}
In [214]: rg = dict.fromkeys(g.keys(),[])
In [215]: rg
Out[215]: {'a': [], 'b': []}
In [216]: rg['a'].append('x')
In [217]: rg
Out[217]: {'a':
On 11/9/2010 9:14 AM, Ciccio wrote:
Hi all,
hope you can help me understanding why the following happens:
In [213]: g = {'a': ['a1','a2'], 'b':['b1','b2']}
In [214]: rg = dict.fromkeys(g.keys(),[])
If you rewrite this as
bl = []
rg = dict.fromkeys(g.keys(),bl)
is the answer any more
Il 09/11/2010 16:47, Terry Reedy ha scritto:
On 11/9/2010 9:14 AM, Ciccio wrote:
Hi all,
hope you can help me understanding why the following happens:
In [213]: g = {'a': ['a1','a2'], 'b':['b1','b2']}
In [214]: rg = dict.fromkeys(g.keys(),[])
If you rewrite this as
bl = []
rg =
Thank you all, this was timely and helpful.
francesco
--
http://mail.python.org/mailman/listinfo/python-list
On 11/9/2010 12:19 PM, Ciccio wrote:
Il 09/11/2010 16:47, Terry Reedy ha scritto:
On 11/9/2010 9:14 AM, Ciccio wrote:
Hi all,
hope you can help me understanding why the following happens:
In [213]: g = {'a': ['a1','a2'], 'b':['b1','b2']}
In [214]: rg = dict.fromkeys(g.keys(),[])
If you
On 11/9/2010 1:43 PM, Terry Reedy wrote:
... List *is* useful as an initializer for
collecitons.defaultdicts.
And it was useful when several members of this forum helped me to
develop a prime-number generator.
See http://www.mail-archive.com/python-list@python.org/msg288128.html.
(I meant
On 2010-05-07, Terry Reedy tjre...@udel.edu wrote:
On 5/6/2010 3:34 PM, Artur Siekielski wrote:
Hello.
I found this strange behaviour of lambdas, closures and list
comprehensions:
funs = [lambda: x for x in range(5)]
[f() for f in funs]
[4, 4, 4, 4, 4]
You succumbed to lambda hypnosis
On 5/7/2010 8:31 AM, Neil Cerutti wrote:
On 2010-05-07, Terry Reedytjre...@udel.edu wrote:
On 5/6/2010 3:34 PM, Artur Siekielski wrote:
Hello.
I found this strange behaviour of lambdas, closures and list
comprehensions:
funs = [lambda: x for x in range(5)]
[f() for f in funs]
[4, 4, 4, 4
Hello.
I found this strange behaviour of lambdas, closures and list
comprehensions:
funs = [lambda: x for x in range(5)]
[f() for f in funs]
[4, 4, 4, 4, 4]
Of course I was expecting the list [0, 1, 2, 3, 4] as the result. The
'x' was bound to the final value of 'range(5)' expression for ALL
On 5/6/2010 12:34 PM Artur Siekielski said...
Hello.
I found this strange behaviour of lambdas, closures and list
comprehensions:
funs = [lambda: x for x in range(5)]
funs is now a list of lambda functions that return 'x' (whatever it
currently is from whereever it's accessible when invoked
Artur Siekielski artur.siekielski at gmail.com writes:
Of course I was expecting the list [0, 1, 2, 3, 4] as the result. The
'x' was bound to the final value of 'range(5)' expression for ALL
defined functions. Can you explain this? Is this only counterintuitive
example or an error in
On May 6, 9:34 pm, Artur Siekielski artur.siekiel...@gmail.com
wrote:
Hello.
I found this strange behaviour of lambdas, closures and list
comprehensions:
funs = [lambda: x for x in range(5)]
[f() for f in funs]
[4, 4, 4, 4, 4]
Of course I was expecting the list [0, 1, 2, 3, 4
On 5/6/2010 3:34 PM, Artur Siekielski wrote:
Hello.
I found this strange behaviour of lambdas, closures and list
comprehensions:
funs = [lambda: x for x in range(5)]
[f() for f in funs]
[4, 4, 4, 4, 4]
You succumbed to lambda hypnosis, a common malady ;-).
The above will not work in 3.x
Mark Dickinson dicki...@gmail.com added the comment:
You don't say what behaviour you were expecting! :)
By design, almost all Decimal operations (but not creation of a Decimal from an
integer or string) round to the precision given by the current context. By
default that precision is 28
Mark Dickinson dicki...@gmail.com added the comment:
It might also help to note that, with decimal, what you see (from repr() of a
Decimal instance) is *exactly* what you get. So when you see
dec
Decimal('1.797693134862315907729305191E+308')
that number really is exactly what's stored in
('2.109752663820230210576934273E+280')
dec == Decimal('0.1')
False
--
components: Library (Lib)
messages: 97192
nosy: parmax
severity: normal
status: open
title: Strange behaviour of decimal.Decimal
type: behavior
versions: Python 2.6
___
Python tracker rep
hello all,
i am relatively new to python and i am trying to convert a php app i
have over to it using googleapps.
anyway here is the problem. i poll ebay API which has in its XML ?
xml version=1.0 encoding=utf-8?findItemsAdvancedRequest
xmlns=http://www.ebay.com/marketplace/search/v1/services;
khany wrote:
hello all,
i am relatively new to python and i am trying to convert a php app i
have over to it using googleapps.
anyway here is the problem. i poll ebay API which has in its XML ?
xml version=1.0 encoding=utf-8?findItemsAdvancedRequest
On Mon, Oct 19, 2009 at 05:44 -0700, khany wrote:
i am relatively new to python and i am trying to convert a php app i
have over to it using googleapps.
Welcome!
anyway here is the problem. i poll ebay API which has in its XML ?
xml version=1.0 encoding=utf-8?findItemsAdvancedRequest
On 19 Oct, 13:44, khany sharif.k...@gmail.com wrote:
hello all,
i am relatively new to python and i am trying to convert a php app i
have over to it using googleapps.
anyway here is the problem. i poll ebay API which has in its XML ?
xml version=1.0 encoding=utf-8?findItemsAdvancedRequest
On Oct 19, 9:15 pm, khany sharif.k...@gmail.com wrote:
On 19 Oct, 13:44, khany sharif.k...@gmail.com wrote:
hello all,
i am relatively new to python and i am trying to convert a php app i
have over to it using googleapps.
anyway here is the problem. i poll ebay API which has in its XML
On 19 Oct, 14:44, StarWing weasley...@sina.com wrote:
On Oct 19, 9:15 pm, khany sharif.k...@gmail.com wrote:
On 19 Oct, 13:44, khany sharif.k...@gmail.com wrote:
hello all,
i am relatively new to python and i am trying to convert a php app i
have over to it using googleapps.
On Oct 11, 3:04 am, metal metal...@gmail.com wrote:
Environment:
PythonWin 2.5.4 (r254:67916, Apr 27 2009, 15:41:14) [MSC v.1310 32 bit
(Intel)] on win32.
Portions Copyright 1994-2008 Mark Hammond - see 'Help/About PythonWin'
for further copyright information.
Evil Code:
class Foo:
On 10月11日, 下午5时30分, ryles ryle...@gmail.com wrote:
On Oct 11, 3:04 am, metal metal...@gmail.com wrote:
Environment:
PythonWin 2.5.4 (r254:67916, Apr 27 2009, 15:41:14) [MSC v.1310 32 bit
(Intel)] on win32.
Portions Copyright 1994-2008 Mark Hammond - see 'Help/About PythonWin'
for
YES!
This is what I was looking for.
Great! All works fine now.
Thank you very much Gabriel.
Gabriel Genellina schreef:
Add this on your sitecustomize.py module (or create one)
import sys
def raw_input(prompt=None):
if prompt: sys.stdout.write(prompt)
return original_raw_input()
Yes, I know.
There are several ways to work around the problem.
(Look at the innitial code I provided in this discussion start)
Fact is, every time I'm getting a script from somewhere or someone, I
have to search and replace all the affected code.
Not very conveniant.
That's why I rather would
En Sun, 27 Jan 2008 12:51:51 -0200, Dox33 [EMAIL PROTECTED]
escribi�:
Yes, I know.
There are several ways to work around the problem.
(Look at the innitial code I provided in this discussion start)
Fact is, every time I'm getting a script from somewhere or someone, I
have to search and
On Sat, 26 Jan 2008 04:23:36 -0800 (PST), Dox33
[EMAIL PROTECTED] wrote:
snip
WHERE IS THE SECOND LINE?
It is in the file stderr_catch.txt!!!
See the problem?
Please Tell me? Why is the prompt produced by raw_input() printed to
the error channel? It should be stdout, just as the print
I ran into a very strange behaviour of raw_input().
I hope somebody can tell me how to fix this.
(Or is this a problem in the python source?)
I will explain the problem by using 3 examples. (Sorry, long email)
The first two examples are behaving normal, the thirth is
strange...
I wrote
On Jan 26, 7:23 am, Dox33 [EMAIL PROTECTED] wrote:
I ran into a very strange behaviour of raw_input().
I hope somebody can tell me how to fix this.
===CUT===
*** Thirst, redirect stderr to file, STRANGE behaviour..
From the command prompt I run:
python script.py 2 stderr_catch.txt
] wrote:
On Jan 26, 7:23 am, Dox33 [EMAIL PROTECTED] wrote:
I ran into a very strange behaviour of raw_input().
I hope somebody can tell me how to fix this.
===CUT===
*** Thirst, redirect stderr to file, STRANGE behaviour..
From the command prompt I run:
python script.py 2
I believe a workaround to the bug of raw_input sending the prompt to stderr
is
print 'prompt:',
a = raw_input()
Not nice, but possibly better that waiting for a corrected binary.
--
http://mail.python.org/mailman/listinfo/python-list
Dox33 [EMAIL PROTECTED] writes:
Thanks for your reply. Since I momentarily do not have the ability
to build a new python executable, I would like to ask for your help
in this case. Are you able to supply me with a corrected version?
You can simply choose not to use raw_input, and use
On Dec 6, 2:51 pm, Spes [EMAIL PROTECTED] wrote:
Hi,
I have this simple code:
| #!/usr/bin/python
| import codecs
| import re
| from copy import deepcopy
|
| class MyClass(object):
| def __del__(self):
| deepcopy(1)
|
| x=MyClass()
but I get an error:
| Exception
Hi,
I have this simple code:
| #!/usr/bin/python
| import codecs
| import re
| from copy import deepcopy
|
| class MyClass(object):
| def __del__(self):
| deepcopy(1)
|
| x=MyClass()
but I get an error:
| Exception exceptions.TypeError: 'NoneType' object is not callable
in bound method
On Dec 6, 3:51 pm, Spes [EMAIL PROTECTED] wrote:
Hi,
I have this simple code:
| #!/usr/bin/python
| import codecs
| import re
| from copy import deepcopy
|
| class MyClass(object):
| def __del__(self):
| deepcopy(1)
|
| x=MyClass()
but I get an error:
| Exception
En Thu, 06 Dec 2007 18:51:08 -0300, Spes [EMAIL PROTECTED]
escribió:
I have this simple code:
| #!/usr/bin/python
| import codecs
| import re
| from copy import deepcopy
|
| class MyClass(object):
| def __del__(self):
| deepcopy(1)
|
| x=MyClass()
but I get an error:
|
Andreas Kraemer [EMAIL PROTECTED] wrote:
The only other behaviours I would regard as intuitive for iteration over
a mutating sequence would be to throw an exception either for mutating
the sequence while the iterator exists or for using the iterator after a
mutation.
Maybe it would have
On Oct 19, 1:49 pm, Duncan Booth [EMAIL PROTECTED] wrote:
Andreas Kraemer [EMAIL PROTECTED] wrote:
The only other behaviours I would regard as intuitive for iteration over
a mutating sequence would be to throw an exception either for mutating
the sequence while the iterator exists or for
On Thu, 18 Oct 2007 02:49:12 -0300, Gabriel Genellina wrote:
A reversed object is rather simple: it stores the original sequence (a
reference, as usual, not a copy!) and the next index to use, starting at
len-1. Each time the next() method is called, the index is decremented
until it goes
On Thu, 18 Oct 2007 15:24:27 +1000, Ben Finney wrote:
Steven D'Aprano [EMAIL PROTECTED] writes:
and help(reversed) but neither gives any insight to what happens when
you use reversed() on a sequence, then modify the sequence.
I would think the answer is the same for any question about
101 - 200 of 301 matches
Mail list logo