code blocks

2015-05-03 Thread Dr. John Q. Hacker
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

[issue24068] statistics module - incorrect results with boolean input

2015-05-03 Thread Mark Dickinson
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

[issue20357] Mention buildbots in the core dev section of the devguide

2015-05-03 Thread Mark Lawrence
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

[issue10965] dev task of documenting undocumented APIs

2015-05-03 Thread Mark Lawrence
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 ___

[issue24092] Use after free in Element.extend (2)

2015-05-03 Thread Arfrever Frehtes Taifersar Arahesis
Changes by Arfrever Frehtes Taifersar Arahesis arfrever@gmail.com: -- nosy: +Arfrever ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue24092 ___

[issue24091] Use after free in Element.extend (1)

2015-05-03 Thread Arfrever Frehtes Taifersar Arahesis
Changes by Arfrever Frehtes Taifersar Arahesis arfrever@gmail.com: -- nosy: +Arfrever ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue24091 ___

[issue24095] Use after free during json encoding a dict (2)

2015-05-03 Thread Arfrever Frehtes Taifersar Arahesis
Changes by Arfrever Frehtes Taifersar Arahesis arfrever@gmail.com: -- nosy: +Arfrever ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue24095 ___

[issue24094] Use after free during json encoding (PyType_IsSubtype)

2015-05-03 Thread Arfrever Frehtes Taifersar Arahesis
Changes by Arfrever Frehtes Taifersar Arahesis arfrever@gmail.com: -- nosy: +Arfrever ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue24094 ___

[issue24093] Use after free in Element.remove

2015-05-03 Thread Arfrever Frehtes Taifersar Arahesis
Changes by Arfrever Frehtes Taifersar Arahesis arfrever@gmail.com: -- nosy: +Arfrever ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue24093 ___

[issue24096] Use after free in get_filter

2015-05-03 Thread Arfrever Frehtes Taifersar Arahesis
Changes by Arfrever Frehtes Taifersar Arahesis arfrever@gmail.com: -- nosy: +Arfrever ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue24096 ___

[issue24097] Use after free in PyObject_GetState

2015-05-03 Thread Arfrever Frehtes Taifersar Arahesis
Changes by Arfrever Frehtes Taifersar Arahesis arfrever@gmail.com: -- nosy: +Arfrever ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue24097 ___

[issue20749] shutil.unpack_archive(): security concerns not documented

2015-05-03 Thread Mark Lawrence
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

[issue24098] Multiple use after frees in obj2ast_* methods

2015-05-03 Thread Arfrever Frehtes Taifersar Arahesis
Changes by Arfrever Frehtes Taifersar Arahesis arfrever@gmail.com: -- nosy: +Arfrever ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue24098 ___

[issue24100] Use after free in siftdown (2)

2015-05-03 Thread Arfrever Frehtes Taifersar Arahesis
Changes by Arfrever Frehtes Taifersar Arahesis arfrever@gmail.com: -- nosy: +Arfrever ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue24100 ___

[issue24099] Use after free in siftdown (1)

2015-05-03 Thread Arfrever Frehtes Taifersar Arahesis
Changes by Arfrever Frehtes Taifersar Arahesis arfrever@gmail.com: -- nosy: +Arfrever ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue24099 ___

[issue24101] Use after free in siftup

2015-05-03 Thread Arfrever Frehtes Taifersar Arahesis
Changes by Arfrever Frehtes Taifersar Arahesis arfrever@gmail.com: -- nosy: +Arfrever ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue24101 ___

[issue24103] Use after free in xmlparser_setevents (1)

2015-05-03 Thread Arfrever Frehtes Taifersar Arahesis
Changes by Arfrever Frehtes Taifersar Arahesis arfrever@gmail.com: -- nosy: +Arfrever ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue24103 ___

[issue24102] Multiple type confusions in unicode error handlers

2015-05-03 Thread Arfrever Frehtes Taifersar Arahesis
Changes by Arfrever Frehtes Taifersar Arahesis arfrever@gmail.com: -- nosy: +Arfrever ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue24102 ___

[issue24104] Use after free in xmlparser_setevents (2)

2015-05-03 Thread Arfrever Frehtes Taifersar Arahesis
Changes by Arfrever Frehtes Taifersar Arahesis arfrever@gmail.com: -- nosy: +Arfrever ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue24104 ___

Re: Python xlrd

2015-05-03 Thread Ervin Hegedüs
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

[issue24105] Use after free during json encoding a dict (3)

2015-05-03 Thread Arfrever Frehtes Taifersar Arahesis
Changes by Arfrever Frehtes Taifersar Arahesis arfrever@gmail.com: -- nosy: +Arfrever ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue24105 ___

Re: Messages with a time stamp

2015-05-03 Thread Michiel Overtoom
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,

Re: Is this a good way to implement testing

2015-05-03 Thread Cecil Westerhof
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

Re: code blocks

2015-05-03 Thread Ben Bacarisse
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

[issue24056] Expose closure generator status in function repr()

2015-05-03 Thread Arfrever Frehtes Taifersar Arahesis
Changes by Arfrever Frehtes Taifersar Arahesis arfrever@gmail.com: -- nosy: +Arfrever ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue24056 ___

[issue24116] --with-pydebug has no effect when the final python binary is compiled

2015-05-03 Thread aleb
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 \

[issue24115] PyObject_IsInstance() and PyObject_IsSubclass() can fail

2015-05-03 Thread Arfrever Frehtes Taifersar Arahesis
Changes by Arfrever Frehtes Taifersar Arahesis arfrever@gmail.com: -- nosy: +Arfrever ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue24115 ___

[issue24116] --with-pydebug has no effect when the final python binary is compiled

2015-05-03 Thread Arfrever Frehtes Taifersar Arahesis
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 ___

Re: Is this a good way to implement testing

2015-05-03 Thread Cecil Westerhof
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= [

[issue24117] A small bug in GB18030 decoder.

2015-05-03 Thread Ma Lin
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.

[issue24117] A small bug in GB18030 decoder.

2015-05-03 Thread Ma Lin
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 ___

Converting 5.223701009526849e-05 to 5e-05

2015-05-03 Thread Cecil Westerhof
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)

[issue24117] Wrong range checking in GB18030 decoder.

2015-05-03 Thread Ma Lin
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 ___

Re: Is this a good way to implement testing

2015-05-03 Thread Mark Lawrence
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

Re: Converting 5.223701009526849e-05 to 5e-05

2015-05-03 Thread 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 of value is it? A ‘float’ value has many different textual representations, most of them inaccurate. So talking about the digits

Re: Is this a good way to implement testing

2015-05-03 Thread 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 implementation, so I am leaning to putting it in a separate file. Definitely use an established

[issue24117] Wrong range checking in GB18030 decoder.

2015-05-03 Thread Serhiy Storchaka
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 ___

Re: Converting 5.223701009526849e-05 to 5e-05

2015-05-03 Thread Ben Finney
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 =

Messages with a time stamp

2015-05-03 Thread Cecil Westerhof
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

Re: Is this a good way to implement testing

2015-05-03 Thread Ben Finney
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

Re: Best way to use globally format

2015-05-03 Thread Peter Otten
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 + '}

[issue24113] shlex constructor unreachable code

2015-05-03 Thread Berker Peksag
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

[issue20148] Derby: Convert the _sre module to use Argument Clinic

2015-05-03 Thread Steve Dower
Steve Dower added the comment: Sorry, wasn't watching the other issue. :) -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue20148 ___ ___

[issue20148] Derby: Convert the _sre module to use Argument Clinic

2015-05-03 Thread Larry Hastings
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 ___

[issue20168] Derby: Convert the _tkinter module to use Argument Clinic

2015-05-03 Thread Larry Hastings
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 ___

[issue24123] Python 2.7 Tutorial Conflicting behavior with WeakValueDictionary.

2015-05-03 Thread Jesse Bacon
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

[issue24123] Python 2.7 Tutorial Conflicting behavior with WeakValueDictionary.

2015-05-03 Thread Jesse Bacon
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

[issue20148] Derby: Convert the _sre module to use Argument Clinic

2015-05-03 Thread Serhiy Storchaka
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? --

[issue20148] Derby: Convert the _sre module to use Argument Clinic

2015-05-03 Thread Larry Hastings
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

[issue20148] Derby: Convert the _sre module to use Argument Clinic

2015-05-03 Thread Steve Dower
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

[issue20179] Derby #10: Convert 50 sites to Argument Clinic across 4 files

2015-05-03 Thread Antoine Pitrou
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

[issue20179] Derby #10: Convert 50 sites to Argument Clinic across 4 files

2015-05-03 Thread Larry Hastings
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

[issue24113] shlex constructor unreachable code

2015-05-03 Thread Andrew Barnert
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,

[issue20168] Derby: Convert the _tkinter module to use Argument Clinic

2015-05-03 Thread Steve Dower
Steve Dower added the comment: LGTM -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue20168 ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue24051] Argument Clinic no longer works with single optional argument

2015-05-03 Thread Serhiy Storchaka
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

[issue20148] Derby: Convert the _sre module to use Argument Clinic

2015-05-03 Thread Larry Hastings
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

[issue20179] Derby #10: Convert 50 sites to Argument Clinic across 4 files

2015-05-03 Thread Larry Hastings
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

[issue24123] Python 2.7 Tutorial Conflicting behavior with WeakValueDictionary.

2015-05-03 Thread Jesse Bacon
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

[issue24121] collections page doesn't mention that deques are mutable

2015-05-03 Thread Raymond Hettinger
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

[issue24051] Argument Clinic no longer works with single optional argument

2015-05-03 Thread Larry Hastings
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. --

[issue24051] Argument Clinic no longer works with single optional argument

2015-05-03 Thread Larry Hastings
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

[issue20148] Derby: Convert the _sre module to use Argument Clinic

2015-05-03 Thread Steve Dower
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

[issue20148] Derby: Convert the _sre module to use Argument Clinic

2015-05-03 Thread Larry Hastings
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

[issue20179] Derby #10: Convert 50 sites to Argument Clinic across 4 files

2015-05-03 Thread Antoine Pitrou
Antoine Pitrou added the comment: Thank you! -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue20179 ___ ___ Python-bugs-list mailing list

[issue20168] Derby: Convert the _tkinter module to use Argument Clinic

2015-05-03 Thread Roundup Robot
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

[issue20148] Derby: Convert the _sre module to use Argument Clinic

2015-05-03 Thread Roundup Robot
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

[issue21800] Implement RFC 6855 (IMAP Support for UTF-8) in imaplib.

2015-05-03 Thread R. David Murray
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

[issue24123] Python 2.7 Tutorial Conflicting behavior with WeakValueDictionary.

2015-05-03 Thread R. David Murray
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

[issue24123] Python 2.7 Tutorial Conflicting behavior with WeakValueDictionary.

2015-05-03 Thread Jesse Bacon
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

[issue16344] Traceback Internationalization Proposal

2015-05-03 Thread Mariano Reingart
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

[issue23857] Make default HTTPS certificate verification setting configurable via global ini file

2015-05-03 Thread Nick Coghlan
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

[issue16344] Traceback Internationalization Proposal

2015-05-03 Thread Steven D'Aprano
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

[issue24123] Python 2.7 Tutorial Conflicting behavior with WeakValueDictionary.

2015-05-03 Thread Jesse Bacon
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

Re: l = range(int(1E9))

2015-05-03 Thread Steven D'Aprano
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

[issue22881] show median in benchmark results

2015-05-03 Thread Stefan Behnel
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

[issue22881] show median in benchmark results

2015-05-03 Thread Serhiy Storchaka
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 ___

[issue22881] show median in benchmark results

2015-05-03 Thread Antoine Pitrou
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

Re: Inner workings of this Python feature: Can a Python data structure reference itself?

2015-05-03 Thread vasudevram
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:

[issue20182] Derby #13: Convert 50 sites to Argument Clinic across 5 files

2015-05-03 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Added new comments. issue20182.signalmodule.patch LGTM. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue20182 ___

Unicode surrogate pairs (Python 3.4)

2015-05-03 Thread Jon Ribbens
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

[issue9517] Make test.script_helper more comprehensive, and use it in the test suite

2015-05-03 Thread Berker Peksag
Changes by Berker Peksag berker.pek...@gmail.com: -- stage: patch review - commit review ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue9517 ___

Re: Converting 5.223701009526849e-05 to 5e-05

2015-05-03 Thread 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 interested in all the digest after the dot. What type

Re: Inner workings of this Python feature: Can a Python data structure reference itself?

2015-05-03 Thread vasudevram
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

[issue24117] Wrong range checking in GB18030 decoder.

2015-05-03 Thread Marc-Andre Lemburg
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 ___

Re: l = range(int(1E9))

2015-05-03 Thread Steven D'Aprano
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

[issue22881] show median in benchmark results

2015-05-03 Thread Stefan Behnel
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 ___ ___

[issue20179] Derby #10: Convert 50 sites to Argument Clinic across 4 files

2015-05-03 Thread Antoine Pitrou
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

Re: Converting 5.223701009526849e-05 to 5e-05

2015-05-03 Thread Cecil Westerhof
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

Re: Messages with a time stamp

2015-05-03 Thread Cecil Westerhof
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

Re: l = range(int(1E9))

2015-05-03 Thread Steven D'Aprano
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

[issue22881] show median in benchmark results

2015-05-03 Thread Antoine Pitrou
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

Re: Inner workings of this Python feature: Can a Python data structure reference itself?

2015-05-03 Thread vasudevram
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:

[issue20168] Derby: Convert the _tkinter module to use Argument Clinic

2015-05-03 Thread Serhiy Storchaka
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

[issue20148] Derby: Convert the _sre module to use Argument Clinic

2015-05-03 Thread Serhiy Storchaka
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 ___

Re: Throw the cat among the pigeons

2015-05-03 Thread Cecil Westerhof
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

Re: Is this a good way to implement testing

2015-05-03 Thread Mark Lawrence
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

Re: Converting 5.223701009526849e-05 to 5e-05

2015-05-03 Thread Chris Angelico
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

[issue22881] show median in benchmark results

2015-05-03 Thread Antoine Pitrou
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 ___

Re: Messages with a time stamp

2015-05-03 Thread Mark Lawrence
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

[issue22619] Possible implementation of negative limit for traceback functions

2015-05-03 Thread Serhiy Storchaka
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   2   >