Stefan Krah added the comment:
I would be willing to write an (alternative) PEP, but I'm not quite satisfied
with my own proposal yet. Also, I'd need to understand the positional-only
part better, but the _cursesmodule.c example does not seem to compile here. :)
So, *disrega
Changes by Stefan Behnel :
--
nosy: +scoder
___
Python tracker
<http://bugs.python.org/issue16612>
___
___
Python-bugs-list mailing list
Unsubscribe:
Stefan Krah added the comment:
OK, I'll have a go at the PEP then. In addition to the proposed syntax
in my previous mail, I'm going to suggest this alternative:
/*[preprocessor]
# Declaration
os.stat [PyOs_Stat] (
{ path: [string, bytes, int] => path_converter => path_t },
Stefan Behnel added the comment:
Updated patch to also fix a little typo in the docstring (lower case "python").
--
Added file: http://bugs.python.org/file29096/inspect_sig_3.patch
___
Python tracker
<http://bugs.python.o
Stefan Krah added the comment:
Eric Snow wrote:
> Looking this over, it seems like there were outstanding objections to adding
> this to the devguide and to the content.
I have no issues with the content of the second patch. However, snakebite
has changed the situation a little: We don&
Stefan Krah added the comment:
Serhiy Storchaka wrote:
> > { path: [string, bytes, int] => path_converter => path_t },
>
> And register types somewhere:
I must admit that I had a similar thought when I first heard about the project:
If we're going through all this
Stefan Krah added the comment:
I think msg93598 sums it up: array_ass_slice() is only called with
v==NULL, so the issue can't be triggered.
However, it's pretty dirty to leave the code as is (IIRC Coverity
also had some complaints), so Chuck's suggestion to rewrite
Stefan Krah added the comment:
TBH, I don't think we should support this platform officially.
Is that processor still in use (e.g. in embedded systems)?
--
nosy: +skrah
___
Python tracker
<http://bugs.python.org/is
Stefan Krah added the comment:
mirabilos wrote:
> Please dont break what works. We have almost complete (about three quarters
> of roughly 10'000 source packages) Debian unstable working on m68k, with
> several versions of Python in use. Thanks!
Are you saying that the compl
Stefan Krah added the comment:
3.2 has a better error message:
>>> "{:<06}".format(Decimal("1.2"))
Traceback (most recent call last):
File "", line 1, in
File "/usr/lib/python3.2/decimal.py", line 3632, in __format__
spec = _parse
Stefan Krah added the comment:
Christian Heimes wrote:
> The output is from Python 3.3. Why has Python 3.3 a less informative error
> message than 3.2?
Because the error is discovered in libmpdec and it would require a significant
amount of work to provide fine-grained error messages
Stefan Krah added the comment:
With int and float it's also possible to specify both conflicting
alignments and fill characters:
>>> "{:x<06}".format(1.2)
'1.2xxx'
So I really think that the builtins should be changed to detect
the conflict.
Stefan Krah added the comment:
I'm getting the complete file here, too.
--
nosy: +skrah
status: open -> pending
___
Python tracker
<http://bugs.python.org
Changes by Stefan Krah :
--
resolution: -> works for me
stage: -> committed/rejected
status: pending -> closed
type: -> behavior
___
Python tracker
<http://bugs.python
Stefan Behnel added the comment:
Let me throw in a quick reminder that Cython has substantially faster argument
parsing than the C-API functions provide because it translates function
signatures like
def func(int a, b=1, *, list c, d=2):
...
into tightly specialised unpacking
Stefan Behnel added the comment:
Cython does that in general, sure. However, this ticket is about a specific
case where string methods (which are implemented in C) are slow when called
from Python. Antoine found out that the main overhead is not so much from the
method lookup itself but from
Stefan Behnel added the comment:
I still can't see a reference to Cython in the PEP. Larry, I don't really mind
adding a newly designed DSL for this, but regarding the implementation of the
actual argument parser, could you at least add a short paragraph to the PEP
that mentions i
Stefan Behnel added the comment:
I mentioned it in a couple of places during the discussion, you might just have
missed them.
The code that generates the unpacking C code starts here:
https://github.com/cython/cython/blob/4ebc647c2fa54179d25335b2dcf5d845e7fc9a79/Cython/Compiler/Nodes.py#L3068
New submission from Stefan Behnel:
The functionality of dict.setdefault() is not currently available through the
C-API. Specfically, there is no way to test for a key and insert a fallback
value for it without evaluating the hash function twice.
The attached patch adds a new C-API function
New submission from Stefan Behnel:
While writing the patch for issue 17327, I noticed that there is a double
reference leak in dict_setdefault() under the rare condition that resizing
fails. I'm not 100% sure that it's ok to move the increfs behind the resizing,
but considerin
Stefan Ring added the comment:
When I originally worked on this, I noticed that _PyThread_CurrentFrames also
iterates over all interpreters. Because I have no experience with or use for
multiple interpreters, I intentionally left it out of my patch, but shouldn't
it be taken into accoun
Stefan Ring added the comment:
(Regarding your test)
I have also noticed in the past that joining threads after a fork has caused
hangs occasionally, although that might have resulted from the messed up
_current_frames.
--
___
Python tracker
<h
Stefan Behnel added the comment:
I agree with basically all counter-arguments that were brought up so far. While
I would eventually like to use the available length hints in the special case
of Cython's list comprehensions, I'm far from seeing a general applicability
for this. The
Stefan Krah added the comment:
Thanks for the patch. Should be fixed.
--
resolution: -> fixed
stage: -> committed/rejected
status: open -> closed
___
Python tracker
<http://bugs.python.or
Stefan Behnel added the comment:
The problem with 'default' is that it is a reserved word in C. I changed it to
"defaultobj", except for the docs page, where "default" should work. I also
removed the "register" declaration from the "mp" ar
Stefan Behnel added the comment:
I had originally considered that name. However, what it really does is
PyDict_GetItem(). In a specific special case, it sets a default value and
*then* returns that. So it's still PyDict_GetItem(), just with a preceding
modification. Also, the interface m
Stefan Behnel added the comment:
Well, guess what, I kind-of figured that. So, what's wrong with
PyDict_GetItemSetDefault()? That mimics the Python method name, too, while at
the same time making it clear what actually happens and how the C-API function
be
Stefan Behnel added the comment:
To me, PyDict_SetDefault() sounds like it's supposed to set a default value
that PyDict_GetItem() would return instead of NULL on lookup failure. Basically
a defaultdict-like extension to normal dicts.
--
___
P
Stefan Behnel added the comment:
I'm fine with PyDict_GetItemOrSetDefault() as well.
--
___
Python tracker
<http://bugs.python.org/issue17327>
___
___
Pytho
Stefan Behnel added the comment:
Ok (shrug), since everyone seems to agree, PyDict_SetDefault() it is. I
wouldn't be surprised if the same kind of discussion lead to the original
naming of dict.setdefault()...
--
Added file: http://bugs.python.org/file29345/pydict_setitemdefault.
Stefan Behnel added the comment:
If you decide to refactor a well tested patch, you might want to give it
another test run before committing it.
Objects/dictobject.c: In function 'dict_setdefault':
Objects/dictobject.c:2266:5: warning: passing argument 1 of 'PyDict_Se
Stefan Behnel added the comment:
I'm totally ok with your changes, though. The only real difference is an
aditional type check in the slot function path, and that's not going to make
any difference right after the costly operation of unpacking python function
Stefan Krah added the comment:
I've started working on the alternative DSL PEP, but I hit a DSL-independent
roadblock:
The preprocessor passes copies of structs to the _impl functions,
which could lead to subtle bugs. I pointed out a benign example on
Rietveld, but in general I think
Stefan Behnel added the comment:
Benjamin, I hadn't noticed that you also changed the documentation in dict.rst
from what I originall wrote. Ezio already fixed one of your typos, but there's
another one in the description of the "defaultobj" behaviour: it says
"inser
Stefan Behnel added the comment:
Please use either of the following wordings in the documentation:
"""
If the key is not in the dict, it is inserted with value *defaultobj* and
*defaultobj* is returned.
"""
or
"""
If the key is not in the dict,
Stefan Behnel added the comment:
... and it's called "defaultobj", not "defautobj".
--
___
Python tracker
<http://bugs.python.org/issue17327>
___
_
Stefan Behnel added the comment:
Thanks!
--
___
Python tracker
<http://bugs.python.org/issue17327>
___
___
Python-bugs-list mailing list
Unsubscribe:
Changes by Stefan Krah :
--
keywords: +patch
Added file: http://bugs.python.org/file29395/issue16612-alternative-dsl.diff
___
Python tracker
<http://bugs.python.org/issue16
Changes by Stefan Krah :
Added file: http://bugs.python.org/file29396/preprocess
___
Python tracker
<http://bugs.python.org/issue16612>
___
___
Python-bugs-list mailin
Changes by Stefan Krah :
Added file: http://bugs.python.org/file29397/printsemant
___
Python tracker
<http://bugs.python.org/issue16612>
___
___
Python-bugs-list mailin
Stefan Krah added the comment:
Larry has requested privately that I send the counter proposal PEP and
additional information, so here it is:
I've send the PEP draft to Nick. The patch that I uploaded contains
DSL examples, an ml-yacc grammar and token specifications.
Two prototype tool
Stefan Krah added the comment:
I agree with "won't fix" for the original issue. These locale functions
are in effect superseded by PEP 3101 formatting.
For decimal locale specific formatting, use:
format(Decimal("1729.1415927"), "n")
IOW, I don't
Stefan Krah added the comment:
Cédric Krier wrote:
> locale.atof is not about formatting but parsing string into float following
> the locale.
You're right. Sorry, I never use these locale functions. My impression is
that locales are often buggy or differ across platforms (see #
Stefan Krah added the comment:
Is this the same as #17245?
--
nosy: +skrah
___
Python tracker
<http://bugs.python.org/issue17423>
___
___
Python-bugs-list mailin
Stefan Krah added the comment:
I've corresponded privately with Daniele Varrazzo about the psycopg2
issue already and then forgot about this (the psycopg2 fix is good).
Yes, the change was intentional. There's one open issue (#15944)
where dabeaz isn't happy about the change, so
New submission from Stefan Behnel:
Here is an artificial but pretty broad ElementTree benchmark, testing the
modules xml.etree.ElementTree, xml.etree.cElementTree and lxml.etree (if
importable). Please add it to the benchmark suite.
--
components: Benchmarks, XML
files
Changes by Stefan Behnel :
--
nosy: +brett.cannon, pitrou
___
Python tracker
<http://bugs.python.org/issue17573>
___
___
Python-bugs-list mailing list
Unsubscribe:
Stefan Behnel added the comment:
I considered lxml.etree support more of a convenience feature, just for
comparison. Given that it's a binary package that doesn't run reliably on other
Python implementations apart of CPython, I don't think it's really interesting
to
Stefan Behnel added the comment:
Ok, but an lxml benchmark is independent from this patch then. I updated it to
only use cElementTree, with the additional "--etree-module" option and also a
"--no-accelerator" option for advanced usage.
Another thing I did is to split the a
New submission from Stefan Bucur:
When calling urllib.urlopen with a string containing the NULL ('\x00')
character, a TypeError exception is thrown, as in the following example:
urllib.urlopen('\x00\x00\x00')
[...]
File "/home/bucur/onion/python-bin/lib/python2.
Stefan Krah added the comment:
The change seems to slow down the pi float benchmark. Run this and hit
Ctrl-C after the first decimal result appears:
./python Modules/_decimal/tests/bench.py
I've run the benchmark seven times and the average for float is
something like 8-10% slower (6
Stefan Krah added the comment:
I'm surprised, too, but after a couple of retries the results stay the
same. On an i7 there's also a difference, but not quite as large. I'm
using b16527f84774.diff, which applies cleanly apart from importlib.h
(which I just regenerated).
With an
Stefan Krah added the comment:
BTW, there's no general slowdown on the Core2 Duo: In the patched version,
the telco benchmark is consistently 4% faster.
--
___
Python tracker
<http://bugs.python.org/is
Stefan Krah added the comment:
Antoine Pitrou wrote:
> It's customary for even innocent changes in ceval to produce small
> changes in some benchmarks. It's only really important to consider the
> global average.
Yes, the float benchmark appears to be particularly sens
Stefan Krah added the comment:
Unsurprisingly (libmpdec is a C library) this also does not work in _decimal. I
could add a special case in _decimal.c at the cost of
two additional if statements for all regular use cases.
Is padding with NUL a legitimate use case? IOW, is the slowdown
Stefan Krah added the comment:
Mark Dickinson wrote:
> Numpy, for example, pads strings will NUL bytes when placing a short
> string in long fixed-width field.
I was hoping to escape the work, but that's quite convincing. ;)
Changing libmpdec doesn't look very appealing, so p
New submission from Stefan Krah:
Making the _decimal part of #17705 a separate issue. I noticed that
decimal.py does not allow a newline as a fill character:
Python 3.3.0rc2+ (default:50dd7426b880, Sep 25 2012, 15:52:28)
[GCC 4.4.3] on linux
Type "help", "copyright", &
Stefan Mihaila added the comment:
Hello. I apologize once again for not finalizing my work, but once I have
started my final year of faculty and a job, I have been busy pretty much all
the time. I would really like to finish this as I've really enjoyed working on
it, and everything o
Stefan Krah added the comment:
Mark Dickinson wrote:
> No idea. Do you have good evidence that 64-bit integer types *will* be
> supported on all platforms that we care about Python compiling on?
I'm not sure how many people have tried to compile Python 3.3 on obscure
platforms, b
Stefan Krah added the comment:
Mark Dickinson wrote:
> There's also some cleanup to be done with respect to semantics; I think it's
> still the case that the various PyLong_FromXXX functions have different
> behaviours with respect to overflow, __int__, __index__ and the l
New submission from Stefan Chrobot:
http://docs.python.org/3/reference/simple_stmts.html#the-import-statement
After the "Examples", there's a duplicated paragraph:
The public names defined by a module are determined by checking the module’s
namespace for a variable named __al
New submission from Stefan Chrobot:
http://docs.python.org/3/reference/simple_stmts.html#assignment-statements
The docs says:
"If the target is a slicing: The primary expression in the reference is
evaluated. It should yield a mutable sequence object (such as a list). The
assigned o
Changes by Stefan Mihaila :
--
nosy: +mstefanro
___
Python tracker
<http://bugs.python.org/issue17810>
___
___
Python-bugs-list mailing list
Unsubscribe:
Changes by Stefan Mihaila :
Added file: http://bugs.python.org/file30211/780722877a3e.diff
___
Python tracker
<http://bugs.python.org/issue17810>
___
___
Python-bug
Changes by Stefan Mihaila :
Removed file: http://bugs.python.org/file30211/780722877a3e.diff
___
Python tracker
<http://bugs.python.org/issue17810>
___
___
Python-bug
Stefan Mihaila added the comment:
On 5/10/2013 11:46 PM, Stefan Mihaila wrote:
> Changes by Stefan Mihaila :
>
>
> --
> nosy: +mstefanro
>
> ___
> Python tracker
> <http://bugs.python.org/issue17810>
> ___
Changes by Stefan Mihaila :
Added file: http://bugs.python.org/file30216/d0c3a8d4947a.diff
___
Python tracker
<http://bugs.python.org/issue15642>
___
___
Python-bug
Changes by Stefan Drees :
--
nosy: +sdrees
___
Python tracker
<http://bugs.python.org/issue17962>
___
___
Python-bugs-list mailing list
Unsubscribe:
Changes by Stefan Drees :
--
nosy: +dilettant
___
Python tracker
<http://bugs.python.org/issue17128>
___
___
Python-bugs-list mailing list
Unsubscribe:
Changes by Stefan Drees :
--
nosy: +dilettant
___
Python tracker
<http://bugs.python.org/issue17959>
___
___
Python-bugs-list mailing list
Unsubscribe:
Changes by Stefan Drees :
--
nosy: +dilettant
___
Python tracker
<http://bugs.python.org/issue17914>
___
___
Python-bugs-list mailing list
Unsubscribe:
Changes by Stefan Drees :
--
nosy: +dilettant
___
Python tracker
<http://bugs.python.org/issue11016>
___
___
Python-bugs-list mailing list
Unsubscribe:
Stefan Krah added the comment:
I cannot reproduce this here. Did you run "make distclean" before compiling?
--
nosy: +skrah
___
Python tracker
<http://bugs.python.o
Changes by Stefan Behnel :
--
nosy: +eli.bendersky, scoder
___
Python tracker
<http://bugs.python.org/issue22622>
___
___
Python-bugs-list mailing list
Unsub
New submission from Stefan Tatschner:
CAN support was introduced with issue #10141. Python still seems to lack
support for CAN FD which is available with the socket option CAN_RAW_FD_FRAMES,
see here (chapter 4.1.5):
https://www.kernel.org/doc/Documentation/networking/can.txt
Stefan Krah added the comment:
This seems like too much trouble for 2.7. Closing, since I was the
one who opened the issue (just reopen if you think it is still worth
it).
--
assignee: skrah ->
resolution: -> fixed
stage: patch review -> resolved
status: open
Changes by Stefan Krah :
--
nosy: -skrah
___
Python tracker
<http://bugs.python.org/issue12974>
___
___
Python-bugs-list mailing list
Unsubscribe:
Stefan Krah added the comment:
2.7 is the only remaining candidate for the fix. I'm not going to
work on it: somehow seems too risky for 2.7 at this stage.
--
assignee: skrah ->
resolution: -> fixed
stage: needs patch -> resolved
status: open -> pending
versi
Stefan Krah added the comment:
Closing, since the main request is tracked in #3132.
--
resolution: -> duplicate
stage: needs patch ->
___
Python tracker
<http://bugs.python.org/i
Changes by Stefan Krah :
--
nosy: -skrah
___
Python tracker
<http://bugs.python.org/issue14262>
___
___
Python-bugs-list mailing list
Unsubscribe:
Changes by Stefan Krah :
--
nosy: -skrah
___
Python tracker
<http://bugs.python.org/issue15671>
___
___
Python-bugs-list mailing list
Unsubscribe:
Changes by Stefan Krah :
--
nosy: -skrah
___
Python tracker
<http://bugs.python.org/issue13124>
___
___
Python-bugs-list mailing list
Unsubscribe:
Changes by Stefan Krah :
--
nosy: -skrah
___
Python tracker
<http://bugs.python.org/issue7406>
___
___
Python-bugs-list mailing list
Unsubscribe:
Changes by Stefan Krah :
--
nosy: -skrah
___
Python tracker
<http://bugs.python.org/issue14757>
___
___
Python-bugs-list mailing list
Unsubscribe:
Stefan Krah added the comment:
Thanks, but this is just a module for testing the buffer API. :)
So let's keep it simple and close the issue.
--
keywords: +gsoc, needs review -pep3121
resolution: -> rejected
stage: -> resolved
status: ope
Changes by Stefan Krah :
--
nosy: -skrah
___
Python tracker
<http://bugs.python.org/issue15945>
___
___
Python-bugs-list mailing list
Unsubscribe:
Changes by Stefan Krah :
--
nosy: -skrah
___
Python tracker
<http://bugs.python.org/issue10581>
___
___
Python-bugs-list mailing list
Unsubscribe:
Changes by Stefan Krah :
--
nosy: -skrah
___
Python tracker
<http://bugs.python.org/issue13918>
___
___
Python-bugs-list mailing list
Unsubscribe:
Changes by Stefan Krah :
--
nosy: -skrah
___
Python tracker
<http://bugs.python.org/issue14260>
___
___
Python-bugs-list mailing list
Unsubscribe:
Changes by Stefan Krah :
--
nosy: -skrah
___
Python tracker
<http://bugs.python.org/issue22327>
___
___
Python-bugs-list mailing list
Unsubscribe:
Changes by Stefan Krah :
--
nosy: -skrah
___
Python tracker
<http://bugs.python.org/issue16991>
___
___
Python-bugs-list mailing list
Unsubscribe:
Changes by Stefan Krah :
--
nosy: -skrah
___
Python tracker
<http://bugs.python.org/issue20440>
___
___
Python-bugs-list mailing list
Unsubscribe:
Stefan Krah added the comment:
I guess there's not much to be done here.
--
resolution: -> wont fix
stage: -> resolved
status: open -> closed
___
Python tracker
<http://bugs.pyth
Changes by Stefan Krah :
--
status: open -> closed
___
Python tracker
<http://bugs.python.org/issue15857>
___
___
Python-bugs-list mailing list
Unsubscrib
Changes by Stefan Krah :
--
nosy: -skrah
___
Python tracker
<http://bugs.python.org/issue22581>
___
___
Python-bugs-list mailing list
Unsubscribe:
Changes by Stefan Krah :
--
nosy: -skrah
___
Python tracker
<http://bugs.python.org/issue20575>
___
___
Python-bugs-list mailing list
Unsubscribe:
Changes by Stefan Krah :
--
nosy: -skrah
___
Python tracker
<http://bugs.python.org/issue20499>
___
___
Python-bugs-list mailing list
Unsubscribe:
Stefan Krah added the comment:
Well, since I was the one who opened this: It seems difficult if
not impossible to fix the problem, so we can probably close the
issue.
[Please just reopen if you disagree.]
--
resolution: -> wont fix
stage: needs patch -> re
Changes by Stefan Krah :
--
status: open -> closed
___
Python tracker
<http://bugs.python.org/issue13090>
___
___
Python-bugs-list mailing list
Unsubscrib
Stefan Krah added the comment:
The comparisons can be somewhat meaningless though:
>>> from _testbuffer import *
>>> x = ndarray([1.1, 2.2, 3.3, 4.4, 5.5, 6.6], shape=[2,3], format="f")
>>> x.tolist()
[[1.10023841858, 2.20047683716, 3.2
4101 - 4200 of 4955 matches
Mail list logo