New submission from anatoly techtonik techto...@gmail.com:
It is an error to try to inherit from function and the error message in
this case is:
{{{
Traceback (most recent call last):
File stdin, line 1, in module
File m:\p\pb.py, line 4, in module
class
Georg Brandl ge...@python.org added the comment:
Thanks, fixed in r74632.
--
resolution: - fixed
status: open - closed
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue6828
___
New submission from Toshihiro Kamiya t-kam...@aist.go.jp:
I found the syntax of collections.defaultdict is confusing, at least to
me.
When I need a defaultdict of int, that is, a defaultdict which contains
int objects, I can write simply:
a = defaultdict(int)
However, when I want a
New submission from Jonas Byström highfest...@gmail.com:
Code from 2.x containing __idiv__ does not translate into
def __floordiv__(self, x): self.__truediv__(x)
def __truediv__(self, x): ...
--
components: 2to3 (2.x to 3.0 conversion tool)
messages: 92194
nosy: highfestiva
severity:
Mark Dickinson dicki...@gmail.com added the comment:
The py3k patch no longer works: it makes use of PyObject_Cmp, which no
longer exists.
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue1766304
New submission from Jerzy jer...@genesilico.pl:
Hi
When I am outputting unicode strings to terminal my script works OK, but
when I redirect it to file I get a crash:
$ python mailing/message_sender.py -l Bia
Białystok
$ python mailing/message_sender.py -l Bia ~/tmp/aaa.txt
Traceback (most
Mark Dickinson dicki...@gmail.com added the comment:
The trunk patch is also unacceptable in its current form:
1. there are no docs or tests
2. keyval, start, step and end should have type long, not type int
(as Antoine already mentioned)
3. the expression ((keyval - start) % step) can
Mark Dickinson dicki...@gmail.com added the comment:
[Joseph Thomson]
Also, as I said in my closed duplicate issue, 'if value in range(lower,
upper)' to me looks far more Pythonic than 'if value = lower and value
upper'.
Note that the Pythonic spelling would be: 'if lower = value upper'.
New submission from Paul van der Linden p...@soulbase.nl:
The attached python file will give the following output, which is
incorrect behavior as far as I know:
this will fail
failed local variable 'in_std' referenced before assignment
this won't fail
Not failed
this won't fail either
Not
Amaury Forgeot d'Arc amaur...@gmail.com added the comment:
This is precisely documented here:
http://docs.python.org/library/pickle.html#object.__setstate__
Note: For new-style classes, if __getstate__() returns a false value,
the __setstate__() method will not be called.
If you want some
Mark Dickinson dicki...@gmail.com added the comment:
This is not a bug. The behaviour you're seeing is described here:
http://docs.python.org/reference/executionmodel.html#naming-and-binding
If a name binding operation occurs anywhere within a code block, all
uses of the name within the block
Benjamin Peterson benja...@python.org added the comment:
You have to use an encoding that's not ascii then.
--
nosy: +benjamin.peterson
resolution: - works for me
status: open - closed
___
Python tracker rep...@bugs.python.org
Jerzy jer...@genesilico.pl added the comment:
I know how to make it work. The question is why outputting to file makes
it crush when outputting to terminal does not.
I have never seen $program file behaving in a different way than
$program in any other language
Jerzy Orlowski
Benjamin
Georg Brandl ge...@python.org added the comment:
When output goes to a terminal, Python can determine its encoding. For a
file, it cannot, therefore it refuses to guess.
Also, many programs behave differently when used with redirection;
namely, all those that use `isatty()` to determine if
Georg Brandl ge...@python.org added the comment:
Assigning to Brett who added this check in r35368.
--
assignee: - brett.cannon
nosy: +brett.cannon, georg.brandl
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue6823
Georg Brandl ge...@python.org added the comment:
This won't change -- the argument of defaultdict is simply a callable
that is called with no arguments and returns the default value.
It works with `int` because `int()` can be called without arguments and
yields 0; however, `defaultdict` cannot.
Jerzy jer...@genesilico.pl added the comment:
Well, I would suggest using the terminal encoding as default one when
redirecting. In my opinion sys.stdin and sys.stdout should always have
the terminal encoding
Alternatively you could make the function sys.setdefaultencoding()
visible to
Georg Brandl ge...@python.org added the comment:
Thanks, fixed in r74633.
--
resolution: - fixed
status: open - closed
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue6757
___
Amaury Forgeot d'Arc amaur...@gmail.com added the comment:
Those HAVE_XXX symbols should be defined like autoconf does:
#define HAVE_STRFTIME 1
This is what happens on Unix platforms, and AFAIK this plays well with
other libraries which define the same symbols.
--
nosy:
Changes by fideli faisal.moled...@gmail.com:
--
nosy: +fideli
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue6802
___
___
Python-bugs-list mailing
Ronald Oussoren ronaldousso...@mac.com added the comment:
My current plan is to fix this issue, and the issue of 64-bit universal
builds on SL in the weekend.
BTW. I'm not planning to fix this for 2.5 and 2.4, AFAIK both are no
maintained beyond critical security patches.
--
New submission from Ronald Oussoren ronaldousso...@mac.com:
Note: this is mostly a reminder for myself to clean up the pythonw stub
executable
The current implementation of pythonw on OSX uses exec to start an
executable inside the framework, this is needed to be able to use GUI
New submission from Goetz Pfeiffer goet...@googlemail.com:
As described in bug 1108, doctest skips tests on
functions that have been decorated with a decorator that
is defined in a separate file.
As described in bug 1108, the problem lies in
file doctest.py, there in class DocTestFinder,
Brett Cannon br...@python.org added the comment:
On Thu, Sep 3, 2009 at 07:28, Ronald Oussorenrep...@bugs.python.org wrote:
Ronald Oussoren ronaldousso...@mac.com added the comment:
My current plan is to fix this issue, and the issue of 64-bit universal
builds on SL in the weekend.
BTW.
Martin v. Löwis mar...@v.loewis.de added the comment:
Using the terminal encoding for sys.stdout does not work in the general
case, as a (background) process may not *have* a controlling terminal
(such as a CGI script, a cron job, or a Windows service). That Python
recognizes the terminal
Martin v. Löwis mar...@v.loewis.de added the comment:
Can you kindly report how architecture selection works? Is there a
separate binary which execs? Some other magic?
Asking primarily out of curiosity, but if it's a launcher, then
(sym)linking it into a virtualenv might be sufficient.
Jerzy jer...@genesilico.pl added the comment:
OK, I give up.
The problem is that one might test a program on terminal and think that
everything is running OK and then spend a reasonable amount of time
trying to find the problem later
Another approach: couldn't utf8 be set as default encoding
Martin v. Löwis mar...@v.loewis.de added the comment:
If you want to switch to a different language, consider switching to
Python 3. There, all strings are Unicode strings, and files opened in
text mode always use the locale encoding.
--
___
Python
Jack Diederich jackd...@gmail.com added the comment:
applied in r74638
and I've added you to Misc/ACKS
Thanks again for the patch!
--
resolution: - accepted
status: open - closed
___
Python tracker rep...@bugs.python.org
Jack Diederich jackd...@gmail.com added the comment:
I think this is fixed by r74638 but it never triggered on my box (Ubuntu
9.x) so I can't be sure. What distro are you using?
--
assignee: - jackdied
nosy: +jackdied
___
Python tracker
Rodrigo Steinmuller Wanderley rwander...@rsw.digi.com.br added the comment:
On Thu, 03 Sep 2009 20:38:49 +
Jack Diederich rep...@bugs.python.org wrote:
Jack Diederich jackd...@gmail.com added the comment:
applied in r74638
and I've added you to Misc/ACKS
Thanks again for the patch!
Brett Cannon br...@python.org added the comment:
Got a fix, about to start applying it.
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue6806
___
Thomas Kowaliczek linuxdon...@linuxdonald.de added the comment:
Fedora 11 64 Bit
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue6748
___
___
Brett Cannon br...@python.org added the comment:
2.7: 74640
3.2: 74641
3.1: 74642
--
resolution: - fixed
status: open - closed
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue6806
___
Brett Cannon br...@python.org added the comment:
Ugh, damn platforms and having to be different. =)
Normalization is the best solution as Python's docs says the expected
value for the tm_dst field is -1, 0, or 1 (which is why I added the
check).
--
keywords: +easy
priority: - low
Tim Hatch t...@timhatch.com added the comment:
More discussion has gone on in issue #4573 on this topic. Can this bug
be marked as a duplicate?
--
nosy: +thatch
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue2649
Amaury Forgeot d'Arc amaur...@gmail.com added the comment:
I'm not sure to understand. The web page says the module works on all
supported platforms. Many python features works equally well on all
platforms, and I don't feel necessary to repeat this everywhere.
The differences between
Philip Jenvey pjen...@users.sourceforge.net added the comment:
The subprocess docs (in Doc/library/subprocess.rst and the module itself)
need to also reflect this change
--
nosy: +pjenvey
___
Python tracker rep...@bugs.python.org
Jean-Paul Calderone exar...@divmod.com added the comment:
Hey Philip,
I'm not sure I follow. The patch only changes the os module, not the
subprocess module. What subprocess documentation do you think needs to
be updated?
--
___
Python tracker
Philip Jenvey pjen...@users.sourceforge.net added the comment:
Sorry, I meant the docs describing how to convert os.popen* calls to
subprocess calls. They assume the shell arg is always True regardless of
the cmd arg type. Those docs are probably the original source of this bug
--
Jerzy jer...@genesilico.pl added the comment:
good point!
I will give it a try
Jerzy
Martin v. Löwis wrote:
Martin v. Löwis mar...@v.loewis.de added the comment:
If you want to switch to a different language, consider switching to
Python 3. There, all strings are Unicode strings, and
Ritesh Raj Sarraf r...@researchut.com added the comment:
Take help os or help os.fork for example.
WIth the help output that they provide, how am I supposed to know that
os.fork is only supported on Unix.
We can also go with the assumption that the modules shipped are
cross-platform. But then,
42 matches
Mail list logo