Hello,
I'm thinking how interesting it would be to add code blocks to Python, so
that arbitrary strings of code can be passed around. It would open up
some interesting possibilities for self-modifying code and generic
programming.
Since Python has already a plethora of ambiguous string
Mark Dickinson added the comment:
I wonder if it would be better to reject Bool data in this context?
It's not uncommon (and quite useful) in NumPy world to compute basic statistics
on arrays of boolean dtype: the sum of such an array gives a count of the
`True`s, and the mean gives the
Mark Lawrence added the comment:
I couldn't see anything obvious in the devguide so I'm assuming that still
needs doing.
--
nosy: +BreamoreBoy
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue20357
Mark Lawrence added the comment:
Where do we stand on this as #10224 has been closed as out of date?
--
nosy: +BreamoreBoy
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue10965
___
Changes by Arfrever Frehtes Taifersar Arahesis arfrever@gmail.com:
--
nosy: +Arfrever
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue24092
___
Changes by Arfrever Frehtes Taifersar Arahesis arfrever@gmail.com:
--
nosy: +Arfrever
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue24091
___
Changes by Arfrever Frehtes Taifersar Arahesis arfrever@gmail.com:
--
nosy: +Arfrever
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue24095
___
Changes by Arfrever Frehtes Taifersar Arahesis arfrever@gmail.com:
--
nosy: +Arfrever
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue24094
___
Changes by Arfrever Frehtes Taifersar Arahesis arfrever@gmail.com:
--
nosy: +Arfrever
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue24093
___
Changes by Arfrever Frehtes Taifersar Arahesis arfrever@gmail.com:
--
nosy: +Arfrever
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue24096
___
Changes by Arfrever Frehtes Taifersar Arahesis arfrever@gmail.com:
--
nosy: +Arfrever
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue24097
___
Mark Lawrence added the comment:
If there is an agreed standard for security warnings I'll prepare a patch for
this.
--
nosy: +BreamoreBoy
versions: +Python 3.5 -Python 3.3
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue20749
Changes by Arfrever Frehtes Taifersar Arahesis arfrever@gmail.com:
--
nosy: +Arfrever
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue24098
___
Changes by Arfrever Frehtes Taifersar Arahesis arfrever@gmail.com:
--
nosy: +Arfrever
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue24100
___
Changes by Arfrever Frehtes Taifersar Arahesis arfrever@gmail.com:
--
nosy: +Arfrever
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue24099
___
Changes by Arfrever Frehtes Taifersar Arahesis arfrever@gmail.com:
--
nosy: +Arfrever
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue24101
___
Changes by Arfrever Frehtes Taifersar Arahesis arfrever@gmail.com:
--
nosy: +Arfrever
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue24103
___
Changes by Arfrever Frehtes Taifersar Arahesis arfrever@gmail.com:
--
nosy: +Arfrever
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue24102
___
Changes by Arfrever Frehtes Taifersar Arahesis arfrever@gmail.com:
--
nosy: +Arfrever
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue24104
___
hi,
On Sat, May 02, 2015 at 03:12:46PM -0700, lbertolotti via Python-list wrote:
Ubuntu terminal gives me:
import xlrd
I get ImportError: No module named xlrd
Any ideas? I installed it by:
sudo apt-get install python-xlrd
what's the answers of your system for these questions?
dpkg
Changes by Arfrever Frehtes Taifersar Arahesis arfrever@gmail.com:
--
nosy: +Arfrever
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue24105
___
On May 3, 2015, at 10:22, Cecil Westerhof wrote:
For testing I want my messages time stamped like:
For progress reporting, I often use the module below (eta.py), which also gives
a projected time of completion:
import datetime, time, sys
etastart = 0
def eta(done, total, s,
Op Sunday 3 May 2015 12:21 CEST schreef Mark Lawrence:
That looks very promising. But I use the test to verify the
correctness and show the performance. Is that also possible? Or
should I split those out.
Get it working correctly and if it's fast enough for your needs then
job done. If and
Dr. John Q. Hacker zonderv...@gmail.com writes:
I'm thinking how interesting it would be to add code blocks to Python,
so that arbitrary strings of code can be passed around. It would open
up some interesting possibilities for self-modifying code and generic
programming.
Since Python has
Changes by Arfrever Frehtes Taifersar Arahesis arfrever@gmail.com:
--
nosy: +Arfrever
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue24056
___
New submission from aleb:
This is how I configure and build:
$ ./configure --prefix=/usr \
--with-threads \
--with-computed-gotos \
--enable-ipv6 \
--with-system-expat \
--with-dbmliborder=gdbm:ndbm \
Changes by Arfrever Frehtes Taifersar Arahesis arfrever@gmail.com:
--
nosy: +Arfrever
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue24115
___
Arfrever Frehtes Taifersar Arahesis added the comment:
Set CFLAGS when calling configure, not make.
--
nosy: +Arfrever
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue24116
___
Op Sunday 3 May 2015 00:29 CEST schreef Cecil Westerhof:
Still on my journey to learn Python.
At the moment I define the test functionality in the following way:
if __name__ == '__main__':
keywords= [
'all',
'factorial',
'fibonacci',
'happy',
'lucky',
]
keywords_msg= [
New submission from Ma Lin:
Hi,
There is a small bug in GB18030 decoder.
For 4-byte sequence, the legal range is:
0x81-0xFE for the 1st byte
0x30-0x39 for the 2nd byte
0x81-0xFE for the 3rd byte
0x30-0x39 for the 4th byte
The current code forgets to check 0xFE of the 1st and 3rd byte.
Changes by Ma Lin wjss...@sohu.com:
--
type: - behavior
Added file: http://bugs.python.org/file39278/forpy3.patch
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue24117
___
When I have a value like 5.223701009526849e-05 in most cases I am not
interested in all the digest after the dot. Is there a simple way to
convert it to a string like '5e-05'?
I could do something like:
def format_small_number(n):
abs_n = abs(n)
assert (abs_n 1) and (abs_n 0)
Changes by Ma Lin wjss...@sohu.com:
--
title: A small bug in GB18030 decoder. - Wrong range checking in GB18030
decoder.
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue24117
___
On 03/05/2015 08:36, Cecil Westerhof wrote:
Thanks for the tips. For most I have to read a ‘little’ first, so I
will not implement them immediately.
Another question. Is it acceptable to have it in the module itself, or
should I put it in something like test_module.py? The code for
testing is
Cecil Westerhof ce...@decebal.nl writes:
When I have a value like 5.223701009526849e-05 in most cases I am not
interested in all the digest after the dot.
What type of value is it?
A ‘float’ value has many different textual representations, most of them
inaccurate. So talking about the digits
Cecil Westerhof wrote:
Another question. Is it acceptable to have it in the module itself, or
should I put it in something like test_module.py? The code for
testing is bigger as the code for the implementation, so I am leaning
to putting it in a separate file.
Definitely use an established
Changes by Serhiy Storchaka storch...@gmail.com:
--
nosy: +lemburg, loewis, serhiy.storchaka
stage: - patch review
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue24117
___
Ben Finney ben+pyt...@benfinney.id.au writes:
Assuming we're talking about a ‘float’ value::
foo = 5.223701009526849e-05
{foo:5.1}.format(foo=foo)
'5e-05'
That's not as clear as it could be. Better is to be explicit about
choosing “exponential” format::
foo =
For testing I want my messages time stamped like:
02:06:32: Check that the non recursive variants give the same value from
1000 upto 10 step 1000
02:06:32: Currently at1000
02:06:33: Currently at 11000
02:06:35: Currently at 21000
02:06:42: Currently at 31000
Peter Otten __pete...@web.de writes:
Be aware that there is also doctest which scans docstrings for text
resembling interactive Python sessions. Doctests are both tests and
usage examples, so I think it's good to put a few of these into the
module.
Yes, it's definitely a good idea to put
Cecil Westerhof wrote:
I have a file where I used a lot of {0}, {1} and {2}. Most but not all
are changed to {0:.3E}, {1:.3E} and {2:.3E}. But when I want to change
the format I come in dependency hell.
I could do something like:
format = ':.3E'
fmt0 = '{0' + format + '}
Berker Peksag added the comment:
Thanks for the report.
Users should either be permitted to set debug on via an optional __init__
parameter,
This is already possible via the debug attribute
(https://docs.python.org/3/library/shlex.html#shlex.shlex.debug), so I don't
think adding a debug
Steve Dower added the comment:
Sorry, wasn't watching the other issue. :)
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue20148
___
___
Larry Hastings added the comment:
Steve, please close this issue when you've confirmed it's now building
correctly on Windows.
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue20148
___
Larry Hastings added the comment:
Steve, please close this issue when you've confirmed it's now building
correctly on Windows.
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue20168
___
New submission from Jesse Bacon:
https://docs.python.org/2/tutorial/stdlib2.html
Section 11.6. Weak References
The example code below from the python tutorial suggests that the value of a is
no persistent when cast into a WeakValueDictionary as entry 'primary'
The value persisted in the
Jesse Bacon added the comment:
https://docs.python.org/2/tutorial/stdlib2.html
Section 11.6. Weak References
The example code below from the python tutorial suggests that the value of 'a'
is not persistent when cast into a WeakValueDictionary as entry 'primary'
The value persisted in the
Serhiy Storchaka added the comment:
Then the patch LGTM. It is easier to make these changes by hand than make a
review for moved code on Rietveld.
I'm not sure, but may be forward static declarations of arrays of unspecified
size is C99-ism?
--
Larry Hastings added the comment:
I agree. I looked it up in the C99 standard. 6.9.2.2 says:
If the declaration of an identifier for an object is a tentative definition
and has internal linkage, the declared type shall not be an incomplete type.
And if you'd hurry up and bless my patch for
Steve Dower added the comment:
It fails on VC10, 11, 12 and 14, so I doubt it's going to be changed. That
said, it looks like the non-static forward definition may be some sort of
extension, since it causes a redefinition error (mismatched storage class) on
all versions when using /Za to
Antoine Pitrou added the comment:
Le 03/05/2015 23:06, Larry Hastings a écrit :
Larry Hastings added the comment:
We discussed it in IRC a bit (and I got a little education).
Can we have a transcript somewhere?
--
___
Python tracker
Larry Hastings added the comment:
We discussed it in IRC a bit (and I got a little education). I can propose
three remedies:
A) back out the Clinic conversion in _ssl.c
B) support Clinic in 2.7 just for _ssl.c
C) do a one-time backport of the Clinic generated code for _ssl.c
IMO these are in
Andrew Barnert added the comment:
Presumably ESR thought that information was useful enough to send Guido a patch
to add it. But apparently nobody's missed it in the 15 years it's been checked
in but unreachable. If anyone needed to know the `instream` and `lineno` right
after initialization,
Steve Dower added the comment:
LGTM
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue20168
___
___
Python-bugs-list mailing list
Unsubscribe:
Serhiy Storchaka added the comment:
Then it would be better to not convert wantobjects() to Argument Clinic. Using
-1 as a value for not passed argument is a hack (added in 1ab9978123be) and I
don't want to propagate it to the signature.
But I afraid that there are other functions that suffer
Larry Hastings added the comment:
Oh, this is only happening on the *beta* compiler? In that case, I genuinely
suggest you file a bug.
We can still check in the workaround, but I really do think MSVS's behavior is
wrong here. (Why is it only for forward static declarations of arrays of
Larry Hastings added the comment:
Attached. Glad you asked right away, it would have been a lot harder to get
later!
--
Added file:
http://bugs.python.org/file39283/irc.transcript.of._ssl.clinic.discussion.txt
___
Python tracker
Jesse Bacon added the comment:
https://docs.python.org/2/tutorial/stdlib2.html
Section 11.6. Weak References
The example code below from the python tutorial suggests that the value of 'a'
is not persistent when cast into a WeakValueDictionary as entry 'primary'
The value persisted in the
New submission from Raymond Hettinger:
Mutability is conferred by the presence of mutating methods. Deques are
documented to have append, pop, extend, appendleft, popleft, extendleft, and
rotate. Also the examples all show mutations.
--
nosy: +rhettinger
resolution: - not a bug
Larry Hastings added the comment:
If the argument currently uses a default value of -1, then I see no problem
with converting it to Argument Clinic using a default value of -1. If you
claim it's a hack then you should discuss that with the author of
1ab9978123be.
--
Larry Hastings added the comment:
Closing as wontfix. This is not a supported use of optional groups.
--
resolution: - wont fix
status: languishing - closed
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue24051
Steve Dower added the comment:
According to
http://compgroups.net/comp.std.c/why-does-the-standard-prohibit-static-int-a/2569729,
it's invalid in both C89 and C99, but some compilers accept it as an extension.
IMO we should avoid relying on compiler extensions, at least in the code files
Larry Hastings added the comment:
(sorry, 6.9.2.3)
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue20148
___
___
Python-bugs-list mailing list
Antoine Pitrou added the comment:
Thank you!
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue20179
___
___
Python-bugs-list mailing list
Roundup Robot added the comment:
New changeset 7a76c462c7f6 by Larry Hastings in branch 'default':
Fix Windows build breakage from checkins on Issues #20148 and #20168.
https://hg.python.org/cpython/rev/7a76c462c7f6
--
___
Python tracker
Roundup Robot added the comment:
New changeset 7a76c462c7f6 by Larry Hastings in branch 'default':
Fix Windows build breakage from checkins on Issues #20148 and #20168.
https://hg.python.org/cpython/rev/7a76c462c7f6
--
___
Python tracker
R. David Murray added the comment:
Here is an updated patch based on Milan's work, including docs. I've tweaked
the API slightly: no dedicated method for doing the enable (instead it is
inlined in authenticate), I added 'enable' to the exposed API (with a doc
caveat about not using it for
R. David Murray added the comment:
If I run the example code you pasted using 2.7, I get a KeyError. So the
example looks correct to me.
--
nosy: +r.david.murray
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue24123
Jesse Bacon added the comment:
Thank you for the second eyes.
I just verified that it works using the standard python shell. It looks like
the bug is in IPython. I’ll post it there.
In [7]: class A:
...: def __init__(self, value):
...: self.value = value
...: def
Mariano Reingart added the comment:
Just for the record, I've presented a CPython Internationalization proposal
for this year Google Summer of Code program:
http://www.google-melange.com/gsoc/proposal/public/google/gsoc2015/reingart/5634387206995968
Indeed, that was my third attempt to move
Nick Coghlan added the comment:
After further consideration, I realised there's an important difference between
this case and the hash randomisation case: having the -E switch imply hash
randomisation was OK, but having it imply HTTPS certificate verification after
the system administrator
Steven D'Aprano added the comment:
For what it's worth, there are at least two localised versions of Python:
Teuton and ChinesePython. As far as I know, ChinesePython is still in active
development. Both translate the keywords and builtins, to German and Chinese
respectively. I don't have a
Jesse Bacon added the comment:
After further testing it appears that the bug is in IPython not Python 2.7.
The bug has been moved to the Python list at
https://github.com/ipython/ipython/issues/8403#issuecomment-98565759
--
resolution: - third party
status: open - closed
On Sun, 3 May 2015 02:51 pm, Ian Kelly wrote:
On Sat, May 2, 2015 at 5:51 PM, Terry Reedy tjre...@udel.edu wrote:
On 5/2/2015 5:31 PM, Ian Kelly wrote:
Would it have been better if range() had been implemented as xrange()
from the beginning? Sure, that would have been great. Except for one
Stefan Behnel added the comment:
I'm actually not sure how it relates to the minimum. The more runs you have,
the higher the chance of hitting the actual minimum at least once. And if none
of the runs hits the real minimum, you're simply out of luck.
However, it should tend to give a much
Serhiy Storchaka added the comment:
May be just drop 5% of largest values to avoid the impact of outliers?
See also issue23552.
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue22881
___
Antoine Pitrou added the comment:
May be just drop 5% of largest values to avoid the impact of outliers?
In fast mode (option -f), there may not be enough samples for that.
--
___
Python tracker rep...@bugs.python.org
On Sunday, May 3, 2015 at 4:48:11 AM UTC+5:30, Terry Reedy wrote:
On 5/2/2015 4:02 PM, vasudevram wrote:
Hi group,
Please refer to this blog post about code showing that a Python data
structure can be self-referential:
Serhiy Storchaka added the comment:
Added new comments. issue20182.signalmodule.patch LGTM.
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue20182
___
If I have a string containing surrogate pairs like this in Python 3.4:
\udb40\udd9d
How do I convert it into the proper form:
\U000E019D
? The answer appears not to be unicodedata.normalize.
--
https://mail.python.org/mailman/listinfo/python-list
Changes by Berker Peksag berker.pek...@gmail.com:
--
stage: patch review - commit review
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue9517
___
On Sun, May 3, 2015 at 7:22 PM, Cecil Westerhof ce...@decebal.nl wrote:
Op Sunday 3 May 2015 10:40 CEST schreef Ben Finney:
Cecil Westerhof ce...@decebal.nl writes:
When I have a value like 5.223701009526849e-05 in most cases I am
not interested in all the digest after the dot.
What type
On Sunday, May 3, 2015 at 1:32:14 AM UTC+5:30, vasudevram wrote:
Hi group,
Please refer to this blog post about code showing that a Python data
structure can be self-referential:
http://jugad2.blogspot.in/2015/05/can-python-data-structure-reference.html
Gotten a couple of comments on
Marc-Andre Lemburg added the comment:
Adding Hye-Shik who wrote the codec.
--
nosy: +hyeshik.chang
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue24117
___
On Sun, 3 May 2015 07:40 am, Jon Ribbens wrote:
On 2015-05-02, BartC b...@freeuk.com wrote:
So do I, I think, if no-one is willing to admit that the original way of
implementing range() was a glaring mistake.
I think the issue is that nobody else here thinks the original way
of iterating
Stefan Behnel added the comment:
Well, we can apply a kludge, or apply statistics.
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue22881
___
___
Antoine Pitrou added the comment:
I have no opinion on whether this is a good thing or not. Security backports
should be few and far between, so I don't think it's a big problem if they are
a bit more difficult.
--
___
Python tracker
Op Sunday 3 May 2015 11:51 CEST schreef Chris Angelico:
On Sun, May 3, 2015 at 7:22 PM, Cecil Westerhof ce...@decebal.nl wrote:
Op Sunday 3 May 2015 10:40 CEST schreef Ben Finney:
Cecil Westerhof ce...@decebal.nl writes:
When I have a value like 5.223701009526849e-05 in most cases I am
not
Op Sunday 3 May 2015 11:36 CEST schreef Mark Lawrence:
Rather than reinvent the wheel maybe you can pinch something from
here
https://docs.python.org/3/howto/logging-cookbook.html#logging-to-multiple-destinations
That looks very promising. The only problem could be that it seems not
to have
On Sun, 3 May 2015 08:33 am, BartC wrote:
OK, so it's just an irritation then, as a workaround has been available
for a long time. (For example, if you use xrange, it won't work on 3.x.
If you use range, then it might be inefficient on 2.x.)
That is trivially easy to deal with. Put this at
Antoine Pitrou added the comment:
Then let's just replace the average with the median? I don't think it makes
sense to add more statistical information to the output (IMHO, there is already
too much of it :-)).
--
___
Python tracker
On Sunday, May 3, 2015 at 6:30:16 PM UTC+5:30, vasudevram wrote:
On Sunday, May 3, 2015 at 4:48:11 AM UTC+5:30, Terry Reedy wrote:
On 5/2/2015 4:02 PM, vasudevram wrote:
Hi group,
Please refer to this blog post about code showing that a Python data
structure can be self-referential:
Serhiy Storchaka added the comment:
wantobjects() was not converted due to a bug in Argument Clinic (issue24051).
--
dependencies: -Argument Clinic no longer works with single optional argument
resolution: - fixed
stage: patch review - resolved
status: open - closed
Changes by Serhiy Storchaka storch...@gmail.com:
--
resolution: - fixed
stage: patch review - resolved
status: open - closed
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue20148
___
Op Saturday 2 May 2015 16:20 CEST schreef Cecil Westerhof:
I am throwing the cat among the pigeons. ;-)
In another thread I mentioned that I liked to have tail recursion in
Python. To be clear not automatic, but asked for.
Looking at the replies I did hit a nerve. But I still want to
On 03/05/2015 10:49, Cecil Westerhof wrote:
Op Sunday 3 May 2015 10:45 CEST schreef Peter Otten:
Cecil Westerhof wrote:
Another question. Is it acceptable to have it in the module itself,
or should I put it in something like test_module.py? The code for
testing is bigger as the code for the
On Sun, May 3, 2015 at 8:02 PM, Cecil Westerhof ce...@decebal.nl wrote:
If the absolute value is bigger as 0 and smaller as 1, it should be
a float. ;-)
Or maybe a fractions.Fraction, or a decimal.Decimal, or a complex,
or maybe a RXSTRING or a Gmp.mpf! There's more than one way to store
a
Antoine Pitrou added the comment:
Have you found the median to be more stable than the minimum here?
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue22881
___
On 03/05/2015 09:22, Cecil Westerhof wrote:
For testing I want my messages time stamped like:
02:06:32: Check that the non recursive variants give the same value from
1000 upto 10 step 1000
02:06:32: Currently at1000
02:06:33: Currently at 11000
02:06:35: Currently
Serhiy Storchaka added the comment:
Thank you for your contribution Dmitry.
--
resolution: - fixed
stage: patch review - resolved
status: open - closed
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue22619
1 - 100 of 183 matches
Mail list logo