Yury Selivanov added the comment:
And also right now, inspect.signature looks for '__text_signature__' when no
used-defined __init__ was found. That's also going to be changed, but again,
when __text_signature__ becomes a public documented API.
--
Larry Hastings added the comment:
I don't think __text_signature__ should ever be a documented public API.
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue20473
___
Yury Selivanov added the comment:
FWIW, I think the same.
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue20473
___
___
Python-bugs-list mailing
Yury Selivanov added the comment:
And also, reading Stefan in another issue, I'm a bit worried that
it may forcibly become a public API. Users tend to start using APIs
before they are public, and that's especially true for python dunder
attributes.
Maybe we should document
Palm Kevin added the comment:
+1
--
nosy: +palm.kevin
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue17213
___
___
Python-bugs-list mailing list
Changes by Mark Dickinson dicki...@gmail.com:
--
nosy: +mark.dickinson
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue17213
___
___
Nick Coghlan added the comment:
Updating the C extension loading API to take advantage of PEP 451 is on the
to do list for 3.5, so I'll see if we can do something about this as well.
However, as Victor noted, it will depend on whether or not we can figure
out a compiler independent cross
Yury Selivanov added the comment:
The problem is that 'zlib.compressobj().flush.__module__ is None'
Can we fix that in zlib?
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue20489
___
Larry Hastings added the comment:
That buildbot is happy now. Thanks for pointing it out!
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue20308
___
Larry Hastings added the comment:
What I'm saying is that the existing function introspection API
would have provided a much better way to do these things,
and that it's good to finally have the meta data available in the
source code so that that API can be made available at some point.
Charles-François Natali added the comment:
Shouldn't this be fixed in the C implementation of the select module or
in selectors.py? It seems likely that the exact range might be different
for each syscall and possibly per OS or even OS version.
Agreed: if we want to fix this, it should be done
Stefan Behnel added the comment:
What existing function introspection API? I wasn't aware there was an
existing mechanism to provide signature metadata for builtin functions.
Not for builtin functions, but it's unclear to me why the API of builtin
functions should be different from that of
Palm Kevin added the comment:
Reproducible for Py 3.2.5
--
versions: +Python 3.2
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue17213
___
___
Larry Hastings added the comment:
Not for builtin functions, but it's unclear to me why the API of
builtin functions should be different from that of Python functions
(except, as I said, for the existence of byte code).
I really don't follow you. You seem to be saying that
Stefan Behnel added the comment:
Python 3.4.0b3+ (default:19d81cc213d7, Feb 1 2014, 10:38:23)
[GCC 4.8.1] on linux
Type help, copyright, credits or license for more information.
def test(a,b,c=None): pass
set(dir(test)) - set(dir(len))
{'__get__', '__code__', '__globals__', '__dict__',
Stefan Behnel added the comment:
test.__code__.co_varnames
()
test.__code__.co_varnames
()
test.__code__.co_varnames
('a', 'b', 'c')
copypasto, please ignore the first two... :o)
--
___
Python tracker rep...@bugs.python.org
Serhiy Storchaka added the comment:
But, how many of the replacement sites are exercised by the tests?
I added tests for most the replacement sites and updated tests has even more
tests.
split() and splitlist() -- tested. Unfortunately they are tested only for bytes
argument because these
Wolfgang Maier added the comment:
Well, I was thinking about frequencies (ints) when suggesting
for x,m in data.items():
T = _coerce_types(T, type(x))
n, d = exact_ratio(x)
partials[d] = partials_get(d, 0) + n*m
in my previous message. To support weights (float or
Oscar Benjamin added the comment:
in my previous message. To support weights (float or Rational) this would
have to be more sophisticated.
I guess you'd do:
for x,w in data.items():
T = _coerce_types(T, type(x))
xn, xd = exact_ratio(x)
wn, wd = exact_ratio(w)
Larry Hastings added the comment:
Yyou have just answered the question How do you determine signature
information for functions written in Python?. A shorter way to express this
answer: functions written in Python are implemented as a function object (in
C, PyFunctionObject), which
Antoine Pitrou added the comment:
You forgot to add the patch :)
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue20498
___
___
Python-bugs-list
Serhiy Storchaka added the comment:
Indeed. Here is a patch.
--
keywords: +patch
Added file: http://bugs.python.org/file33885/stringio_newline_tests.patch
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue20498
Stefan Behnel added the comment:
[...] a builtin code object (PyCFunctionObject) [...] doesn't have any of
the metadata you cited.
That exactly is the bug.
I think we should take the further discussion offline, or move it to a new
ticket.
--
Oscar Benjamin added the comment:
It's not as simple as registering with an ABC. You also need to provide the
interface that the ABC represents:
import sympy
r = sympy.Rational(1, 2)
r
1/2
r.numerator
Traceback (most recent call last):
File stdin, line 1, in module
AttributeError: 'Half'
Marc-Andre Lemburg added the comment:
On 03.02.2014 02:24, STINNER Victor wrote:
STINNER Victor added the comment:
Ever used recode ?
No, what is it? I once used iconv for short tests, but I never required iconv
to convert a real document.
It's a command line tool to convert
Serhiy Storchaka added the comment:
We already have stackable pieces for gzip, bz2 and lzma compressed streams --
GzipFile, BZ2File and LZMAFile. They are more powerful and more efficient than
generic codecs.StreamReader/codecs.StreamWriter (and note that most binary
codecs are just don't
Nick Coghlan added the comment:
Stefan is suggesting that rather than emulating the Python signature line
(which is a concise human readable notation that with the PEP 457 tweaks
will handle even the most obscure custom argument parsing, whether that
parsing is implemented in C or in Python), it
Terry J. Reedy added the comment:
I understand Stefan to (reasonably) want 1 api instead of 2. He imagined that
the only way to do that would be for everything to at least partially imitate
the old methods. Larry and Nick are suggesting instead that everything should
adopt the
Oscar Benjamin added the comment:
I agree that the current wording in the doc-strings is ambiguous. It should be
more careful to distinguish between
mu : true/population mean
xbar : estimated/sample mean
I disagree that the keyword arguments should be made the same. There is an
important
Terry J. Reedy added the comment:
With the additional tests, it seems reasonable to apply.
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue20368
___
Suzumizaki added the comment:
Thanks for taking into account this issue for PEP 451.
Honestly to say, I can't imagine why or/and how this issue(or my patches)
causes any problems especially compatibility issues. If someone can point them,
I will try to resolve.
Note that I extend only the
New submission from Oscar Benjamin:
The mean/variance functions in the statistics module don't quite round
correctly.
The reasons for this are that although exact rational arithmetic is used
internally in the _sum function it is not used throughout the module. In
particular the _sum function
Stefan Behnel added the comment:
I understand Stefan to (reasonably) want 1 api instead of 2.
Absolutely. However, I guess the underlying reasoning here is that there
are other callables, too, so it's not worth making just two kinds of them
look the same, even if both are functions and even if
New submission from Xavier de Gaye:
The following code crashes python with:
python: Objects/object.c:512: PyObject_Str: Assertion `!PyErr_Occurred()'
failed.
on the tip of the default branch, but not on python 3.3.3.
import sys
error = None
try:
raise ValueError('some text')
except
Nick Coghlan added the comment:
As Victor noted, inventing our own encoding scheme just for this use case
isn't desirable, although it's certainly a good fallback option that will
ensure the feature remains feasible even if trying to handle the Unicode
issues at the C compiler level proves too
STINNER Victor added the comment:
Oh, the topic was already discussed some years ago. Start:
https://mail.python.org/pipermail/python-dev/2011-May/111279.html
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue20485
Changes by R. David Murray rdmur...@bitdance.com:
--
nosy: +haypo, larry
priority: normal - release blocker
stage: - needs patch
versions: -Python 3.5
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue20500
Wolfgang Maier added the comment:
there are currently two strict requirements for any numeric type to be usable
with statistics._sum:
I meant *three* of course (remembered one only during writing).
--
___
Python tracker rep...@bugs.python.org
Larry Hastings added the comment:
Also also, I remember specifically that the isinstance(type) code
would fail builtin classes.
Could you please find an example of this?
This was during the development of the original feature. I changed the if
statement for the from_builtin() call so
Wolfgang Maier added the comment:
Just to make sure that this discussion is not getting on the wrong track,
there are currently two strict requirements for any numeric type to be usable
with statistics._sum:
(1) the type has to provide either
- numerator/denominator properties or
- an
Larry Hastings added the comment:
As release manager, I would be willing to consider this patch. However, as
original author of the code in question, I don't like it. Showing zero
filenames, while potentially less confusing, is also far less helpful. A
better solution would be to show both
New submission from Gunnar Aastrand Grimnes:
When reading large files with fileinput, it will work as expected and only
process a line at a time when used normally, but if you add an hook_encoded
openhook it will read the whole file into memory before returning the first
line.
Verify by
New submission from Mauricio de Alencar:
The following code demonstrates an inconsistency of this method in dealing with
zeros after the decimal mark.
from decimal import Context
context = Context(prec=2)
for x in [100., 10., 1., 0.1]:
print(context.create_decimal_from_float(x),
Larry Hastings added the comment:
If it's fixed in 3.4, then the first step would be to ask Georg if he will
accept a fix for 3.3. If he will not, then we don't need to go any further.
--
___
Python tracker rep...@bugs.python.org
Gunnar Aastrand Grimnes added the comment:
The problem lies in codecs.py here:
http://hg.python.org/cpython/file/ae7facd874ba/Lib/codecs.py#l581
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue20501
Mark Lawrence added the comment:
Good afternoon,
Would you please be kind enough to have my name removed from all nosy lists as
I've no interest in being constantly reminded that I've been called a liar.
Kindest regards.
Mark Lawrence.
On Monday, 3 February 2014, 14:46, Larry Hastings
Oscar Benjamin added the comment:
I agree that supporting non-stdlib types is in some ways a separate issue from
how to manage coercion with mixed stdlib types. Can you provide a complete
patch (e.g. hg diff coerce_types.patch).
http://docs.python.org/devguide/
There should probably also be
Kristján Valur Jónsson added the comment:
Here's one for 2.7. I'm still looking at 3. The funny thing is that the
signature of generator.throw reflects 2.x conventions. I'm figuring out if it
can be used with the .with_traceback() idiom
--
keywords: +patch
Added file:
Larry Hastings added the comment:
Mark Lawrence: you can remove it yourself, by directly editing the nosy list
on the page for the bug. If you want to remove yourself from all issues on the
tracker, click on the Followed by you link on the left side and work your way
down the list.
Larry Hastings added the comment:
Nope, we can't fix it in zlib. As far as I can tell, the problem is that
method_get() in descrobject.c passes in NULL for the module to
PyCFunction_NewEx(). method_get gets the type as part of the descriptor
protocol, but type objects in C don't appear to
Mark Lawrence added the comment:
@Larry - thank you for the heads up.
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue20384
___
___
Changes by Mark Lawrence breamore...@yahoo.co.uk:
--
nosy: -BreamoreBoy
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue7325
___
___
Changes by Mark Lawrence breamore...@yahoo.co.uk:
--
nosy: -BreamoreBoy
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue7776
___
___
Changes by Mark Lawrence breamore...@yahoo.co.uk:
--
nosy: -BreamoreBoy
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue20384
___
___
Changes by Mark Lawrence breamore...@yahoo.co.uk:
--
nosy: -BreamoreBoy
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue1353344
___
___
Changes by Mark Lawrence breamore...@yahoo.co.uk:
--
nosy: -BreamoreBoy
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue19145
___
___
Changes by Mark Lawrence breamore...@yahoo.co.uk:
--
nosy: -BreamoreBoy
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue7262
___
___
Changes by Mark Lawrence breamore...@yahoo.co.uk:
--
nosy: -BreamoreBoy
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue20399
___
___
Changes by Mark Lawrence breamore...@yahoo.co.uk:
--
nosy: -BreamoreBoy
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue1776674
___
___
Changes by Mark Lawrence breamore...@yahoo.co.uk:
--
nosy: -BreamoreBoy
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue20047
___
___
Changes by Mark Lawrence breamore...@yahoo.co.uk:
--
nosy: -BreamoreBoy
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue20467
___
___
Changes by Mark Lawrence breamore...@yahoo.co.uk:
--
nosy: -BreamoreBoy
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue4492
___
___
Changes by Mark Lawrence breamore...@yahoo.co.uk:
--
nosy: -Arfrever
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue15027
___
___
Python-bugs-list
Changes by Mark Lawrence breamore...@yahoo.co.uk:
--
nosy: -BreamoreBoy
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue20266
___
___
Changes by Mark Lawrence breamore...@yahoo.co.uk:
--
nosy: -BreamoreBoy
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue2943
___
___
Changes by Mark Lawrence breamore...@yahoo.co.uk:
--
nosy: -BreamoreBoy
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue20335
___
___
Changes by Mark Lawrence breamore...@yahoo.co.uk:
--
nosy: -BreamoreBoy
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue19548
___
___
Changes by Mark Lawrence breamore...@yahoo.co.uk:
--
nosy: -BreamoreBoy
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue6128
___
___
Changes by Mark Lawrence breamore...@yahoo.co.uk:
--
nosy: -BreamoreBoy
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue19980
___
___
Changes by Mark Lawrence breamore...@yahoo.co.uk:
--
nosy: -BreamoreBoy
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue1100942
___
___
Vajrasky Kok added the comment:
Here is the updated patch addressing Zachary's reviews (Thanks!). However,
there are some reviews that I could not implement.
1. This is a good candidate for a custom return converter.
I can not synchronize struct rlimit and NULL return values.
2. Should be
Changes by Mark Lawrence breamore...@yahoo.co.uk:
--
nosy: -BreamoreBoy
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue2175
___
___
Changes by Mark Lawrence breamore...@yahoo.co.uk:
--
nosy: -BreamoreBoy
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue777588
___
___
Changes by Mark Lawrence breamore...@yahoo.co.uk:
--
nosy: -BreamoreBoy
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue19104
___
___
Changes by Mark Lawrence breamore...@yahoo.co.uk:
--
nosy: -BreamoreBoy
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue504219
___
___
Changes by Mark Lawrence breamore...@yahoo.co.uk:
--
nosy: -BreamoreBoy
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue7105
___
___
Changes by Mark Lawrence breamore...@yahoo.co.uk:
--
nosy: -BreamoreBoy
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue4945
___
___
Changes by Mark Lawrence breamore...@yahoo.co.uk:
--
nosy: -BreamoreBoy
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue6501
___
___
Changes by Mark Lawrence breamore...@yahoo.co.uk:
--
nosy: -BreamoreBoy
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue8075
___
___
Changes by Mark Lawrence breamore...@yahoo.co.uk:
--
nosy: -BreamoreBoy
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue14910
___
___
Changes by Mark Lawrence breamore...@yahoo.co.uk:
--
nosy: -BreamoreBoy
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue4037
___
___
Changes by Mark Lawrence breamore...@yahoo.co.uk:
--
nosy: -BreamoreBoy
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue3802
___
___
Changes by Mark Lawrence breamore...@yahoo.co.uk:
--
nosy: -BreamoreBoy
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue19655
___
___
Changes by Mark Lawrence breamore...@yahoo.co.uk:
--
nosy: -BreamoreBoy
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue1208730
___
___
Changes by Mark Lawrence breamore...@yahoo.co.uk:
--
nosy: -BreamoreBoy
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue4727
___
___
Changes by Mark Lawrence breamore...@yahoo.co.uk:
--
nosy: -BreamoreBoy
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue2213
___
___
Changes by Mark Lawrence breamore...@yahoo.co.uk:
--
nosy: -BreamoreBoy
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue1098749
___
___
Changes by Mark Lawrence breamore...@yahoo.co.uk:
--
nosy: -BreamoreBoy
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue2889
___
___
Wolfgang Maier added the comment:
Once the input numbers are converted to float statistics._sum can handle
them perfectly well. In this case I think the output should also be a float so
that it's clear that precision may have been lost. If the precision of float
is not
what the user wants
Changes by Mark Lawrence breamore...@yahoo.co.uk:
--
nosy: -BreamoreBoy
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue7442
___
___
Changes by Mark Lawrence breamore...@yahoo.co.uk:
--
nosy: -BreamoreBoy
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue6159
___
___
Changes by Mark Lawrence breamore...@yahoo.co.uk:
--
nosy: -BreamoreBoy
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue1763
___
___
Changes by Mark Lawrence breamore...@yahoo.co.uk:
--
nosy: -BreamoreBoy
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue6225
___
___
Changes by Mark Lawrence breamore...@yahoo.co.uk:
--
nosy: -BreamoreBoy
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue6181
___
___
R. David Murray added the comment:
This requires (1) a doc update to indicate the problem and (2) a way to tell
fileinput to *not* use readlines to optimize by calling readlines(bufsize),
since in the case of using codecs it can be a problem. Presumably buffer=None
would be the logical way
Changes by Mark Lawrence breamore...@yahoo.co.uk:
--
nosy: -BreamoreBoy
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue4350
___
___
Changes by Mark Lawrence breamore...@yahoo.co.uk:
--
nosy: -BreamoreBoy
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue6335
___
___
Changes by Mark Lawrence breamore...@yahoo.co.uk:
--
nosy: -BreamoreBoy
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue16037
___
___
Changes by Mark Lawrence breamore...@yahoo.co.uk:
--
nosy: -BreamoreBoy
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue7757
___
___
Changes by Mark Lawrence breamore...@yahoo.co.uk:
--
nosy: -BreamoreBoy
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue1887
___
___
1 - 100 of 369 matches
Mail list logo