[issue15718] Possible OverflowError in __len__ method undocumented (when called via len() function)

2017-04-22 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: New changeset bfc7dff63b9b30371e3423a5c35ccda2f3b52218 by Serhiy Storchaka in branch '2.7': [2.7] bpo-15718: Document the upper bound constrain on the __len__ return value. (GH-1256). (#1261)

[issue15718] Possible OverflowError in __len__ method undocumented (when called via len() function)

2017-04-22 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: New changeset c358536fd5e40e8f29ee4f086588a82fccb25a09 by Serhiy Storchaka in branch '3.5': [3.5] bpo-15718: Document the upper bound constrain on the __len__ return value. (GH-1256) (#1260)

[issue15718] Possible OverflowError in __len__ method undocumented (when called via len() function)

2017-04-22 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: New changeset f2ed2858eea7569c8915b3611ca5ec92ae10b17f by Serhiy Storchaka in branch '3.6': [3.6] bpo-15718: Document the upper bound constrain on the __len__ return value. (GH-1256) (#1259)

[issue15718] Possible OverflowError in __len__ method undocumented (when called via len() function)

2017-04-22 Thread Serhiy Storchaka
Changes by Serhiy Storchaka : -- pull_requests: +1374 ___ Python tracker ___ ___

[issue15718] Possible OverflowError in __len__ method undocumented (when called via len() function)

2017-04-22 Thread Serhiy Storchaka
Changes by Serhiy Storchaka : -- pull_requests: +1373 ___ Python tracker ___ ___

[issue15718] Possible OverflowError in __len__ method undocumented (when called via len() function)

2017-04-22 Thread Serhiy Storchaka
Changes by Serhiy Storchaka : -- pull_requests: +1372 ___ Python tracker ___ ___

[issue15718] Possible OverflowError in __len__ method undocumented (when called via len() function)

2017-04-22 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: New changeset 85157cd89a6edac347a5b6871fcf20c500c6fbbf by Serhiy Storchaka in branch 'master': bpo-15718: Document the upper bound constrain on the __len__ return value. (#1256)

Re: Turtle window not closing

2017-04-22 Thread Terry Reedy
On 4/22/2017 3:52 AM, Peter Otten wrote: Harshika Varadhan via Python-list wrote: Are you running your script from within IDLE? Try starting it from the command line instead. Like turtle IDLE itself is a program written in tkinter, and the separation between editer and user code is not

[issue9285] Add a profile decorator to profile and cProfile

2017-04-22 Thread Louie Lu
Louie Lu added the comment: Giampaolo, the assertion is still worked good, and no need to remove them. The assertion is to prevent dispatch return too more, to return upper then when the profiler was created. The problem why profile __enter__ can't work, is because it misses the

[issue30140] Binary arithmetic does not always call subclasses first

2017-04-22 Thread Stephan Hoyer
New submission from Stephan Hoyer: We are writing a system for overloading NumPy operations (see PR [1] and design doc [2]) that is designed to copy and extend Python's system for overloading binary operators. The reference documentation on binary arithmetic [3] states: > Note: If the right

Re: OrderedDict with kwds

2017-04-22 Thread Ben Finney
Albert-Jan Roskam writes: > The basic problem is that kwds is a regular, unordered dict […] (Albert, you are probably aware that the above passage is not what you wrote. But your message shows it indistinguishable from your other text. Please teach your email client to

[issue9285] Add a profile decorator to profile and cProfile

2017-04-22 Thread Giampaolo Rodola'
Giampaolo Rodola' added the comment: Original patch still applies. Not sure if we should continue with that one or with your new PR. The original assertion error is still there. I CCed Tim Peters as it appears he's the one who originally added it in 2001 - maybe he has some clue. --

Re: OrderedDict with kwds

2017-04-22 Thread Ben Finney
INADA Naoki writes: > On Sat, Apr 22, 2017 at 10:41 PM, Ben Finney > wrote: > > So, I would recommend continuing to code as though ‘dict’ is not > > ordered, at least until a Python version is released with a clear > > statement that ordering

[issue23420] python -m cProfile -s fails with non informative message

2017-04-22 Thread Louie Lu
Louie Lu added the comment: If we can solve #30118 for argument unittest, and apply #18971 for optparse to argparse, this issue will then can be solve, too. -- nosy: +louielu ___ Python tracker

Re: String escaping utility for Python (was: Rawest raw string literals)

2017-04-22 Thread MRAB
On 2017-04-22 23:30, Mikhail V wrote: On 20 April 2017 at 23:54, MRAB wrote: > On 2017-04-20 22:03, Mikhail V wrote: >> >> On 20 April 2017 at 22:43, Random832 wrote: >>> [snip] >>> >>> The best solution I can think of is to have a text

[issue29237] Create enum for pstats sorting options

2017-04-22 Thread Louie Lu
Louie Lu added the comment: Mariatta, is there any movement on this issue? Thanks! -- nosy: +louielu ___ Python tracker ___

Re: String escaping utility for Python (was: Rawest raw string literals)

2017-04-22 Thread Chris Angelico
On Sun, Apr 23, 2017 at 12:30 PM, eryk sun wrote: > The X terminals that I've used make it easy to copy text to the > clipboard. For Windows, it's a pain prior to Windows 10 since the > legacy console only does rectangular selection. The Windows 10 console > does line-wrapped

Re: String escaping utility for Python (was: Rawest raw string literals)

2017-04-22 Thread eryk sun
On Sun, Apr 23, 2017 at 2:06 AM, Mikhail V wrote: > > But are you joking, right? Even if it worked, how can this be convinient, > e.g. in console one cannot even select and copy paste easily. The X terminals that I've used make it easy to copy text to the clipboard. For

Re: String escaping utility for Python (was: Rawest raw string literals)

2017-04-22 Thread Chris Angelico
On Sun, Apr 23, 2017 at 12:06 PM, Mikhail V wrote: > Don't know, all I see is "SyntaxError: invalid syntax" if I paste > there some text. > Try to paste e.g. this: > "ffmpeg -i "D:\VIDEO\exp\intro.mp4" -vf "crop=1280:720:0:40, > scale=640:360" -pix_fmt yuv420p

Re: String escaping utility for Python (was: Rawest raw string literals)

2017-04-22 Thread Mikhail V
On 23 April 2017 at 02:33, Chris Angelico wrote: > On Sun, Apr 23, 2017 at 10:19 AM, Mikhail V wrote: >> On 23 April 2017 at 00:48, Chris Angelico wrote: >>> On Sun, Apr 23, 2017 at 8:30 AM, Mikhail V wrote:

[issue30134] BytesWarning is missing from the documents

2017-04-22 Thread Martin Panter
Martin Panter added the comment: . Issue 11681 is already open for the -b option, with a patch in progress. If updating the doc string, also change “buffer” to “bytearray”. This is what “bytearray” was originally called in Python 3, and “buffer” is something different in Python 2. --

[issue23404] 'make touch' does not work with git clones of the source repository

2017-04-22 Thread Martin Panter
Martin Panter added the comment: Do you mean a separate makefile rule to rebuild the generated files, rather than rebuilding them in a normal “make all” build? I would support this; this is what I meant with my “make regenerate” proposal in response to Nick linked above. --

Re: String escaping utility for Python (was: Rawest raw string literals)

2017-04-22 Thread Chris Angelico
On Sun, Apr 23, 2017 at 10:19 AM, Mikhail V wrote: > On 23 April 2017 at 00:48, Chris Angelico wrote: >> On Sun, Apr 23, 2017 at 8:30 AM, Mikhail V wrote: >>> The purpose is simple: reduce manual work to escape special >>> characters

Re: String escaping utility for Python (was: Rawest raw string literals)

2017-04-22 Thread Mikhail V
On 23 April 2017 at 00:48, Chris Angelico wrote: > On Sun, Apr 23, 2017 at 8:30 AM, Mikhail V wrote: >> The purpose is simple: reduce manual work to escape special >> characters in string literals (and escape non-ASCII characters). >> >> Simple usage

Re: String escaping utility for Python (was: Rawest raw string literals)

2017-04-22 Thread Chris Angelico
On Sun, Apr 23, 2017 at 8:30 AM, Mikhail V wrote: > The purpose is simple: reduce manual work to escape special > characters in string literals (and escape non-ASCII characters). > > Simple usage scenario: > - I have a long command-line string in some text editor. > - Copy

[issue29619] st_ino (unsigned long long) is casted to long long in posixmodule.c:_pystat_fromstructstat

2017-04-22 Thread STINNER Victor
STINNER Victor added the comment: Would it work with unsigned long long? What is the value of HAVE_LARGEFILE_SUPPORT? Maybe the code should be simplified to always use unsigned long long. -- ___ Python tracker

String escaping utility for Python (was: Rawest raw string literals)

2017-04-22 Thread Mikhail V
On 20 April 2017 at 23:54, MRAB wrote: > On 2017-04-20 22:03, Mikhail V wrote: >> >> On 20 April 2017 at 22:43, Random832 wrote: >>> [snip] >>> >>> The best solution I can think of is to have a text editor designed to >>> parse a string

[issue29619] st_ino (unsigned long long) is casted to long long in posixmodule.c:_pystat_fromstructstat

2017-04-22 Thread Xavier de Gaye
Xavier de Gaye added the comment: The compilation of Modules/posixmodule.c fails now on Android architecture 'x86' at api level 21, after the above change 0f6d73343d342c106cda2219ebb8a6f0c4bd9b3c: /opt/android-ndk/toolchains/llvm/prebuilt/linux-x86_64/bin/clang

Re: textwrap.fill algorithm? (Difference with vim)

2017-04-22 Thread Matěj Cepl
On 2017-04-22, 18:33 GMT, Peter Otten wrote: > Yes, the documentation should warn about the limitations of > textwrap's notion of width -- but still, the line you > complained about Perhaps, I have screwed up somewhere, but I am glad we were able to figure it out. Thank you for your patience,

[issue29840] Avoid raising OverflowError in bool()

2017-04-22 Thread STINNER Victor
STINNER Victor added the comment: If someone wants to return a value larger than maxsize and support bool(): it is already possible right now by defining a __bool__ method no? If yes, I suggest to only document this CPython implementation detail (consequence of slots, for efficiency) and suggest

[issue29782] Use __builtin_clzl for bits_in_digit if available

2017-04-22 Thread STINNER Victor
STINNER Victor added the comment: I'm in favor of documenting in comments decisions to not micro-optimize such code. I did something similar in ceval.c for 1+1. -- ___ Python tracker

Re: Rawest raw string literals

2017-04-22 Thread Tim Chase
On 2017-04-22 23:13, Mikhail V wrote: > k = r"abc > def" > > gives an error: > > k = r"abc > ^ > SyntaxError: EOL while scanning string literal > > So one could define a rule, that a raw string *must* > be terminated by the sequence quote + newline. > In theory. Though

Re: How to get Buttons to work

2017-04-22 Thread Albert-Jan Roskam
(sorry for top-posting). UpdateRecords and the other functions need to be nested so they fall under your class. Right now they are functions, not methods. AJ From: Python-list on behalf of

Re: Rawest raw string literals

2017-04-22 Thread Chris Angelico
On Sun, Apr 23, 2017 at 7:13 AM, Mikhail V wrote: > So one could define a rule, that a raw string *must* > be terminated by the sequence quote + newline. > In theory. Then how would you pass one as a function parameter? func(r"" ) Ugh. Ugly. ChrisA --

Re: Metaclass conundrum - binding value from an outer scope

2017-04-22 Thread Peter Otten
Skip Montanaro wrote: >> Another round, this time with a metaclass. As you have found partial() >> does not work as a method because it's not a descriptor (i. e. no >> __get__() method). Instead you can try a closure: >> >> def make_method(a): >> underlying = getattr(SomeOtherClass, a) >>

Re: Rawest raw string literals

2017-04-22 Thread Mikhail V
On 20 April 2017 at 18:40, Grant Edwards wrote: > On 2017-04-20, Mikhail V wrote: >> On 20 April 2017 at 17:59, Grant Edwards wrote: >>> On 2017-04-20, Mikhail V wrote: Quite often I need raw

Re: Metaclass conundrum - binding value from an outer scope

2017-04-22 Thread Skip Montanaro
> Another round, this time with a metaclass. As you have found partial() does > not work as a method because it's not a descriptor (i. e. no __get__() > method). Instead you can try a closure: > > def make_method(a): > underlying = getattr(SomeOtherClass, a) > @functools.wraps(underlying)

[issue30139] Fix for issue 8743 not available in python MacOS 3.5.1

2017-04-22 Thread Ned Deily
Ned Deily added the comment: > But there is no neither an entry #8743, nor neighbour entries #14710 and > #13355 in Misc/NEWS. Seems Misc/NEWS is broken. Hmm. They seem to have been properly preserved in the current 3.6 and master branch versions of Misc/HISTORY. Perhaps the 3.5 Misc/NEWS

[issue30139] Fix for issue 8743 not available in python MacOS 3.5.1

2017-04-22 Thread Serhiy Storchaka
Changes by Serhiy Storchaka : -- resolution: -> works for me stage: -> resolved status: open -> closed ___ Python tracker

[issue30139] Fix for issue 8743 not available in python MacOS 3.5.1

2017-04-22 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: But there is no neither an entry #8743, nor neighbour entries #14710 and #13355 in Misc/NEWS. Seems Misc/NEWS is broken. -- nosy: +serhiy.storchaka resolution: works for me -> stage: resolved -> status: closed -> open

[issue30139] Fix for issue 8743 not available in python MacOS 3.5.1

2017-04-22 Thread Ned Deily
Ned Deily added the comment: >> Then you have a broken copy of 3.5.1. Yes. You don't say from where you installed Python 3.5.1 but I just took a quick look at _collections_abc.py in both the versions installed by the python.org 3.5.1 macOS installer and by the current 3.5.3 version (which you

[issue30139] Fix for issue 8743 not available in python MacOS 3.5.1

2017-04-22 Thread R. David Murray
R. David Murray added the comment: Then you have a broken copy of 3.5.1. There is nothing OS-specific about that file. -- nosy: +r.david.murray ___ Python tracker

[issue30139] Fix for issue 8743 not available in python MacOS 3.5.1

2017-04-22 Thread Horacio Hoyos
New submission from Horacio Hoyos: Hi all, I was having issues while testing a custom Set implementation using the _collections_abc base MutableSet and found that my issue was apparently resolved with issue 8743. My test is simple: ms = MySetImpl() ms & 'testword' which should fail with

[issue29816] Get rid of C limitation for shift count in right shift

2017-04-22 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: New changeset 997a4adea606069e01beac6269920709db3994d1 by Serhiy Storchaka in branch 'master': Remove outdated note about constraining of the bit shift right operand. (#1258) https://github.com/python/cpython/commit/997a4adea606069e01beac6269920709db3994d1

Re: textwrap.fill algorithm? (Difference with vim)

2017-04-22 Thread Peter Otten
Matěj Cepl wrote: > On 2017-04-22, 01:01 GMT, Gregory Ewing wrote: >> I don't know what vim is doing, but if you tell Python you >> want lines no longer than 65 characters, it takes you at >> your word. > > Oh, I’ve got it. textwrap.fill() (only in Python 2.*?) completely > sucks with bytes,

[issue30137] Equivalent syntax regarding List returns List objects with non-similar list elements.

2017-04-22 Thread Steven D'Aprano
Steven D'Aprano added the comment: The behaviour is as documented and is not a bug. When you have a three-argument extended slice, the starting and stopping values depend on whether the stride (step) is positive or negative. Although that's buried in a footnote to the table.

Re: Bigotry (you win, I give up)

2017-04-22 Thread Rurpy via Python-list
On 04/22/2017 05:17 AM, Rustom Mody wrote: > On Friday, April 21, 2017 at 2:38:08 PM UTC+5:30, Antoon Pardon wrote: >> Op 20-04-17 om 17:25 schreef Rustom Mody: >>> But more importantly thank you for your polite and consistent pointing out >>> to >>> Ben Finney that his religion-bashing signature

Re: textwrap.fill algorithm? (Difference with vim)

2017-04-22 Thread Matěj Cepl
On 2017-04-22, 01:01 GMT, Gregory Ewing wrote: > I don't know what vim is doing, but if you tell Python you > want lines no longer than 65 characters, it takes you at > your word. Oh, I’ve got it. textwrap.fill() (only in Python 2.*?) completely sucks with bytes, because of course it counts

[issue29352] provide the authorative source for s[i:j] negative slice indices (<-len(s)) behavior for standard sequences

2017-04-22 Thread Stephen J. Turnbull
Stephen J. Turnbull added the comment: I prefer Josh's wording. The important point to me is that >>> [1, 2][2:0] = "AB" [1, 2, "A", "B"] not an error or ["B", "A"] == [1, 2][2:0:-1]. I think too much talk about the endpoints obscures this important fact. (I think I'd like it to be an

[issue26143] Ensure that IDLE's stdlib imports are from the stdlib

2017-04-22 Thread Matthew Cowles
Matthew Cowles added the comment: This bug should be fixed urgently. Over at python-help we just got another Python beginner who was using IDLE and then started to get the "IDLE's subprocess didn't make connection" error. The problem was that the user had named one of their programs

[issue29816] Get rid of C limitation for shift count in right shift

2017-04-22 Thread Serhiy Storchaka
Changes by Serhiy Storchaka : -- pull_requests: +1371 ___ Python tracker ___ ___

[issue30135] default value of argument seems to be overwritten

2017-04-22 Thread Steven D'Aprano
Steven D'Aprano added the comment: In the future please don't post binary files containing source code, especially something as non-standard as 7z. That just makes it difficult for people to review the code. Either paste your code snippet directly into the bug report, or attach it as a .py

[issue30138] Incorrect documentation of replacement of slice of length 0

2017-04-22 Thread Stephen J. Turnbull
Stephen J. Turnbull added the comment: Sorry, I just realized this note only applies to slices with a stride (k in i:j:k). Closing. -- stage: -> resolved status: open -> closed ___ Python tracker

[issue30138] Incorrect documentation of replacement of slice of length 0

2017-04-22 Thread Stephen J. Turnbull
New submission from Stephen J. Turnbull: In section 4.6.3. "Mutable Sequence Types" of current documentation, Note 1 to the table says "[iterable] t must have the same length as the slice it is replacing." This is incorrect in the case of extension: s[len(s):] = t according to the rest of the

[issue23404] 'make touch' does not work with git clones of the source repository

2017-04-22 Thread Brett Cannon
Brett Cannon added the comment: Would it make sense to have a `make rebuild` or something which explicitly ignores prebuilt files? That could then also serve as non-obvious documentation on how to build those files in the first place. -- nosy: +ncoghlan

Re: OrderedDict with kwds

2017-04-22 Thread INADA Naoki
On Sat, Apr 22, 2017 at 10:41 PM, Ben Finney wrote: > INADA Naoki writes: > >> From Python 3.6, keyword arguments are ordered. So the docstring is >> outdated. > > (Thank you, Inada-san, for the implementation!) > > The announcement of the

[issue15718] Possible OverflowError in __len__ method undocumented (when called via len() function)

2017-04-22 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Yes, and the range object already is fixed by issue28876. -- ___ Python tracker ___

[issue27613] Empty iterator with fake __len__ is rendered as a single bracket ] when using json's iterencode

2017-04-22 Thread Serhiy Storchaka
Changes by Serhiy Storchaka : -- pull_requests: +1370 ___ Python tracker ___ ___

[issue27613] Empty iterator with fake __len__ is rendered as a single bracket ] when using json's iterencode

2017-04-22 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: > I am surprised that dumping to a string and to a file give different answers. This is a difference between Python and C implementations. An iterable with fake __len__ looks breaking the invariants, but if a collection with overridden __bool__() is

[issue15718] Possible OverflowError in __len__ method undocumented (when called via len() function)

2017-04-22 Thread Terry J. Reedy
Terry J. Reedy added the comment: Has or will builtin classes be modified to follow advice to include a separate __bool__? In 3.6.1, >>> r = range(19**100) >>> bool(r) Traceback (most recent call last): File "", line 1, in bool(r) OverflowError: Python int too large to

Re: OrderedDict with kwds

2017-04-22 Thread Albert-Jan Roskam
From: eryk sun Sent: Saturday, April 22, 2017 7:59 AM To: Python Main Cc: Albert-Jan Roskam Subject: Re: OrderedDict with kwds   On Fri, Apr 21, 2017 at 6:08 PM, Albert-Jan Roskam wrote: > Would the insertion order be preserved if the last line were

Re: Turtle window not closing

2017-04-22 Thread Harshika Varadhan via Python-list
Thank you for your response. I apologize for that, this is my first time posting so I wasn't sure how to copy my code!  I figured out that using the clear() method works for clearing the turtle window after drawing the game board, but now I am trying to figure out how to make the program wait a

[issue26423] Integer overflow in wrap_lenfunc() on 64-bit build of Windows with len > 2**31-1

2017-04-22 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Could you create a PR for your patch Victor? -- ___ Python tracker ___

Re: Microsoft now ships Python with SQL Server

2017-04-22 Thread justin walters
On Sat, Apr 22, 2017 at 5:05 AM, Steve D'Aprano wrote: > https://blogs.technet.microsoft.com/dataplatforminsider/2017/04/ > 19/python-in-sql-server-2017-enhanced-in-database-machine-learning/ > > Quote: > > We are excited to share the preview release of in-database

[issue29840] Avoid raising OverflowError in bool()

2017-04-22 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: I had similar doubts about this patch and needed opinions of other core developers. > Maybe, if __len__() raises an OverflowError: call again the len(), but using > the "__len__" method instead of the slot? Following patch implements this idea. I don't

[issue15718] Possible OverflowError in __len__ method undocumented (when called via len() function)

2017-04-22 Thread Serhiy Storchaka
Changes by Serhiy Storchaka : -- pull_requests: +1369 ___ Python tracker ___ ___

[issue30137] Equivalent syntax regarding List returns List objects with non-similar list elements.

2017-04-22 Thread Akshay Deogaonkar
New submission from Akshay Deogaonkar: lst = [0,1,2,3,4] print(lst[0:3]) #returns [0,1,2] print(lst[:3]) #returns [0,1,2] #Above two syntax returns same lists. print(lst[0:3:-1]) #returns [] print(lst[:3:-1]) #returns [4] #Here is a bug; what expected was that the both syntax would have

Gephi development references

2017-04-22 Thread tommy yama
Hey there Pythoners, Hope you guys are all well. I am actually very interested in learning the gephi, a platform which is capable of easily developing a variety of awesome graphs. Dose anyone give me some code samples and resources which relates the gephi? Appreciated for reading this! T --

Re: OrderedDict with kwds

2017-04-22 Thread Ben Finney
INADA Naoki writes: > From Python 3.6, keyword arguments are ordered. So the docstring is > outdated. (Thank you, Inada-san, for the implementation!) The announcement of the change specifies that we should not rely on ordered ‘dict’: The order-preserving aspect of

Re: How to get Buttons to work

2017-04-22 Thread Peter Otten
horgan.ant...@gmail.com wrote: > I am busy learning Python and I want to make a simple program that > connects to a database to locate the information of Doctors. Now the as > far as I can see everything works fine, database connects, info gets > displayed, but the buttons don't want to work.

[issue30024] Treat `import a.b.c as m` as `m = sys.modules['a.b.c']`

2017-04-22 Thread Victor Varvariuc
Victor Varvariuc added the comment: How can I facilitate/contribute to get the changes suggested by Serhiy into Python? -- ___ Python tracker ___

How to get Buttons to work

2017-04-22 Thread horgan . anton5
I am busy learning Python and I want to make a simple program that connects to a database to locate the information of Doctors. Now the as far as I can see everything works fine, database connects, info gets displayed, but the buttons don't want to work. Please see code and error below. Any

[issue30135] default value of argument seems to be overwritten

2017-04-22 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: This is correct behavior. You just made a common mistake made by newcomers. Read Python FAQ and other resources, this can help you to avoid other pitfalls. -- ___ Python tracker

[issue29442] Replace optparse with argparse in setup.py

2017-04-22 Thread Chi Hsuan Yen
Chi Hsuan Yen added the comment: I guess you were asking whether the newly compiled Python binary is able to build extension modules or not? I rebased PR 139 against the latest git master and seems it's fine. Running `make distclean`, `./configure` and then `make` builds all modules as

[issue18576] Document test.support.script_helper

2017-04-22 Thread Louie Lu
Louie Lu added the comment: The PR on GitHub is based on bobcatfist's patch, addressed on Martin request and some minor change. -- nosy: +louielu ___ Python tracker

[issue29782] Use __builtin_clzl for bits_in_digit if available

2017-04-22 Thread Louie Lu
Louie Lu added the comment: If this issue is closed by "not a big performance improvement", maybe the XXX in mathmoudle.c should be take off? """ /* XXX: This routine does more or less the same thing as * bits_in_digit() in Objects/longobject.c. Someday it would be nice to * consolidate

[issue29782] Use __builtin_clzl for bits_in_digit if available

2017-04-22 Thread Mark Dickinson
Mark Dickinson added the comment: Closing. -- resolution: -> rejected stage: -> resolved status: open -> closed ___ Python tracker ___

Microsoft now ships Python with SQL Server

2017-04-22 Thread Steve D'Aprano
https://blogs.technet.microsoft.com/dataplatforminsider/2017/04/19/python-in-sql-server-2017-enhanced-in-database-machine-learning/ Quote: We are excited to share the preview release of in-database analytics and machine learning with Python in SQL Server. Python is one of the most popular

[issue30135] default value of argument seems to be overwritten

2017-04-22 Thread Klaus Wolf
Klaus Wolf added the comment: A documented misbheavior is still a misbehavior. -- ___ Python tracker ___ ___

Re: Bigotry (you win, I give up)

2017-04-22 Thread Rustom Mody
On Friday, April 21, 2017 at 2:38:08 PM UTC+5:30, Antoon Pardon wrote: > Op 20-04-17 om 17:25 schreef Rustom Mody: > > But more importantly thank you for your polite and consistent pointing out > > to > > Ben Finney that his religion-bashing signature lines [many of them] and his > > claims to

[issue30113] Allow helper functions to wrap sys.setprofile

2017-04-22 Thread Louie Lu
Changes by Louie Lu : -- pull_requests: +1368 ___ Python tracker ___ ___ Python-bugs-list

[issue30113] Allow helper functions to wrap sys.setprofile

2017-04-22 Thread Louie Lu
Louie Lu added the comment: Thanks, Nick. Your analysis is very helpful. After some testing, I found the problem here is because when we using `sys.setprofile` in the helper function, we didn't simulate the call (from where profiler create to helper function), that cause profile's frame link

Re: OrderedDict with kwds

2017-04-22 Thread Peter Otten
Albert-Jan Roskam wrote: > For regular dicts I like to use the dict() function because the code is > easier to write and read. But OrderedDict() is not equivalent to dict(): > In the docstring of collections.OrderedDict it says "keyword arguments are > not recommended because their insertion

Re: OrderedDict with kwds

2017-04-22 Thread INADA Naoki
On Sat, Apr 22, 2017 at 3:08 AM, Albert-Jan Roskam wrote: > For regular dicts I like to use the dict() function because the code is > easier to write and read. But OrderedDict() is not equivalent to dict(): > In the docstring of collections.OrderedDict it says "keyword

Re: OrderedDict with kwds

2017-04-22 Thread eryk sun
On Fri, Apr 21, 2017 at 6:08 PM, Albert-Jan Roskam wrote: > Would the insertion order be preserved if the last line were to be > replaced with: > > if kwds: > for k, v in kwds.items(): > self[k] = v > if args: > self.__update(*args) # no **kwds! The

Re: Turtle window not closing

2017-04-22 Thread Peter Otten
Harshika Varadhan via Python-list wrote: > I am creating a game where the user inputs a coordinate to place their > piece on a chess board. My code then draws the chess board with a turtle > and fills in the squares in with green where the user can place their next > piece. After the user inputs

[issue30024] Treat `import a.b.c as m` as `m = sys.modules['a.b.c']`

2017-04-22 Thread Nick Coghlan
Nick Coghlan added the comment: Expanding on Serhiy's answer: the ModuleNotFoundError for "import sys.path" comes from IMPORT_NAME, not from any of the subsequent attribute lookups. That difference is visible in the bytecode: >>> dis("import sys.path as path") 1 0 LOAD_CONST

OrderedDict with kwds

2017-04-22 Thread Albert-Jan Roskam
For regular dicts I like to use the dict() function because the code is easier to write and read. But OrderedDict() is not equivalent to dict(): In the docstring of collections.OrderedDict it says "keyword arguments are not recommended because their insertion order is arbitrary"

Turtle window not closing

2017-04-22 Thread Harshika Varadhan via Python-list
Hi everyone, I am creating a game where the user inputs a coordinate to place their piece on a chess board. My code then draws the chess board with a turtle and fills in the squares in with green where the user can place their next piece. After the user inputs their first coordinate, the turtle

[issue30135] default value of argument seems to be overwritten

2017-04-22 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: See "Why are default values shared between objects?" in Python FAQ (https://docs.python.org/3/faq/programming.html#id13). -- nosy: +serhiy.storchaka resolution: -> not a bug stage: -> resolved status: open -> closed

[issue29802] A possible null-pointer dereference in struct.s_unpack_internal()

2017-04-22 Thread Serhiy Storchaka
Changes by Serhiy Storchaka : -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker

[issue29802] A possible null-pointer dereference in struct.s_unpack_internal()

2017-04-22 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: New changeset 7bfd740e3d484e6fdf3f5c2d4640450957f9d89c by Serhiy Storchaka in branch 'master': Remove unneeded Misc/NEWS entry for bpo-29802. (#1251) https://github.com/python/cpython/commit/7bfd740e3d484e6fdf3f5c2d4640450957f9d89c --

[issue18576] Document test.support.script_helper

2017-04-22 Thread Louie Lu
Changes by Louie Lu : -- pull_requests: +1367 ___ Python tracker ___ ___ Python-bugs-list

[issue29960] _random.Random state corrupted on exception

2017-04-22 Thread Serhiy Storchaka
Changes by Serhiy Storchaka : -- assignee: -> serhiy.storchaka stage: needs patch -> backport needed versions: +Python 2.7, Python 3.5, Python 3.6 ___ Python tracker

[issue29960] _random.Random state corrupted on exception

2017-04-22 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: New changeset 9616a82e7802241a4b74cf7ae38d43c37bf66e48 by Serhiy Storchaka (bladebryan) in branch 'master': bpo-29960 _random.Random corrupted on exception in setstate(). (#1019)

[issue29802] A possible null-pointer dereference in struct.s_unpack_internal()

2017-04-22 Thread Serhiy Storchaka
Changes by Serhiy Storchaka : -- pull_requests: +1366 ___ Python tracker ___ ___