Re: [Tutor] beginning to code

2017-09-21 Thread Bill
Stefan Ram wrote: Bill writes: "Essential Reference", and I would say that Python is definitely a bigger, and more complicated language than C++. In some aspects it has simpler syntax. But consider all of the ways that you can pass arguments to a function, for

[issue31452] asyncio.gather does not cancel tasks if one fails

2017-09-21 Thread Yury Selivanov
Yury Selivanov added the comment: > I'm afraid I no longer have all the details of this design in my head, and I > have no idea what the fix does (and no time to read up on everything). Let's say we have three tasks: t1, t2, t3. Then we use gather on them: await gather(t1, t2, t3) Let's

Re: Old Man Yells At Cloud

2017-09-21 Thread Steve D'Aprano
On Fri, 22 Sep 2017 02:00 pm, Rick Johnson wrote: > I think it's grossly unfair to label those who's lives > have been up-ended by the backwards incompatible changes of > Python3 as "haters". Nobody, not one person, has ever had their life upended by Python 3. People have their lives upended

Re: Old Man Yells At Cloud

2017-09-21 Thread Rick Johnson
On Thursday, September 21, 2017 at 10:12:25 AM UTC-5, Steve D'Aprano wrote: > [...] > And remember that the Python core developers feel your pain > too. They had to migrate a large code base (the Python std > library) from 2 to 3. They had to write the 2to3 > translator. And they have to maintain

[issue31550] Inconsistent error message for TypeError with subscripting

2017-09-21 Thread Anthony Sottile
Changes by Anthony Sottile : -- keywords: +patch pull_requests: +3679 stage: -> patch review ___ Python tracker ___

[issue31550] Inconsistent error message for TypeError with subscripting

2017-09-21 Thread Anthony Sottile
New submission from Anthony Sottile: There's a bit of history I don't understand and couldn't find the appropriate trail for. The original error message from the 2.6 era: $ python2.6 -c 0[0] Traceback (most recent call last): File "", line 1, in TypeError: 'int' object is unsubscriptable

[issue31452] asyncio.gather does not cancel tasks if one fails

2017-09-21 Thread Guido van Rossum
Guido van Rossum added the comment: I'm afraid I no longer have all the details of this design in my head, and I have no idea what the fix does (and no time to read up on everything). The OP says "If you do not await gather" -- what happens if you *do* await it? Do the tasks then get killed?

Re: [Tutor] beginning to code

2017-09-21 Thread Bill
Stefan Ram wrote: Bill writes: I understand string[::-1] after only studying python for a day or two (I've only been studying it for 2 weeks at this point). A student could study C++ for a semester or more and not encounter templates until they studied data

Re: Easy way to get a list of tuples.

2017-09-21 Thread Sayth Renshaw
> > > > Thanks Thomas yes you are right with append. I have tried it but just > > can't get it yet as append takes only 1 argument and I wish to give it 3. > > > You have not showed us what you tried, but you are probably missing a pair > of brackets. > > C:\Users\User>python > Python 3.6.0

[issue31092] multiprocessing.Manager() race condition

2017-09-21 Thread Prof Plum
Changes by Prof Plum : -- title: Potential multiprocessing.Manager() race condition -> multiprocessing.Manager() race condition ___ Python tracker

Re: [Tutor] beginning to code

2017-09-21 Thread Bill
Stefan Ram wrote: Just as Python's »string[::-1]« appears "obfuscated" to readers who don't know Python. I understand string[::-1] after only studying python for a day or two (I've only been studying it for 2 weeks at this point). A student could study C++ for a semester or more and not

Re: [Tutor] beginning to code

2017-09-21 Thread Bill
Stefan Ram wrote: Bill writes: Stefan Ram wrote: bartc writes: On 20/09/2017 02:31, Bill wrote: it's implementation, I would say that C++ has it all over Python from the point of view of "intuitiveness". It's much easier to tell what's going on,

[issue31544] gettext.Catalog title is not flagged as a class

2017-09-21 Thread Éric Araujo
Éric Araujo added the comment: Are you talking about https://docs.python.org/3/library/gettext.html#the-catalog-constructor ? I think the lack of markup is on purpose, since the text explains that this is a compatibility measure (mostly obsolete nowadays). For future bug reports, please

[issue31543] Optimize wrapper descriptors using FASTCALL

2017-09-21 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: These slots are the only slots that accept keyword arguments and arbitrary number of positional parameters. Other slots can use fast calls. -- ___ Python tracker

[issue31549] test_strptime and test_time fail on non-English Windows

2017-09-21 Thread Serhiy Storchaka
New submission from Serhiy Storchaka: test_strptime and test_time fail on non-English Windows. For example: == FAIL: test_localtime_timezone (test.test_time.TestPytime)

[issue31539] asyncio.sleep may sleep less time then it should

2017-09-21 Thread Yury Selivanov
Yury Selivanov added the comment: > The performance issue was that the asyncio core loop was running in a loop but did nothing because of time rounding. When the next event was in a few nanoseconds, the e event burnt the CPU during seconds. It can be 15 ms on Windows or 1 ms when using poll()

[issue31539] asyncio.sleep may sleep less time then it should

2017-09-21 Thread STINNER Victor
STINNER Victor added the comment: Issues: - bpo-20320 - bpo-20452 - bpo-20505 - bpo-20311 The performance issue was that the asyncio core loop was running in a loop but did nothing because of time rounding. When the next event was in a few nanoseconds, the e event burnt the CPU during seconds.

[issue31539] asyncio.sleep may sleep less time then it should

2017-09-21 Thread Yury Selivanov
Yury Selivanov added the comment: So here's the relevant piece of code: end_time = self.time() + self._clock_resolution while self._scheduled: handle = self._scheduled[0] if handle._when >= end_time: break handle =

[issue31548] test_os fails on Windows if current directory contains spaces

2017-09-21 Thread Serhiy Storchaka
New submission from Serhiy Storchaka: I just have built Python on Windows first time and ran tests. test_os fails because the current directory path contains spaces. test_spawnl (test.test_os.SpawnTests) ... C:\Users\Serhiy: can't open file 'Storchaka\py\cpython\PCBuild\win32\python.exe':

[issue31539] asyncio.sleep may sleep less time then it should

2017-09-21 Thread Antoine Pitrou
Changes by Antoine Pitrou : -- nosy: +gvanrossum ___ Python tracker ___ ___ Python-bugs-list

[issue31539] asyncio.sleep may sleep less time then it should

2017-09-21 Thread Antoine Pitrou
Antoine Pitrou added the comment: Le 21/09/2017 à 23:31, STINNER Victor a écrit : > > Yury: asyncio can trigger events earlier than scheduled for performance > reasons. If that's true, then it sounds like a bug. If there is a rationale for a "fast and imprecise" API, then it would seem ok to

[issue31539] asyncio.sleep may sleep less time then it should

2017-09-21 Thread STINNER Victor
STINNER Victor added the comment: IMHO we should either just close the issue, ir document the bad clock resolution on Windows in the asyncio doc. Yury: asyncio can trigger events earlier than scheduled for performance reasons. See end_time in asyncio core loop. --

[issue31539] asyncio.sleep may sleep less time then it should

2017-09-21 Thread Yury Selivanov
Yury Selivanov added the comment: > it's expected that the sleep time may be *more* than asked for, but not less > than. Exactly, and asyncio tries to ensure that. It looks like "time.get_clock_info('monotonic').resolution" lies about monotonic clock resolution on Windows so that might be

[issue31543] Optimize wrapper descriptors using FASTCALL

2017-09-21 Thread STINNER Victor
STINNER Victor added the comment: The most complex slots are __new__, __init__ and __call__ because they accept keywords. It's hard to design a calling convention which optimize all cases because of the backward compatibility. The risk is to convert a dict to args + kwnames (tuple) and then back

[issue31539] asyncio.sleep may sleep less time then it should

2017-09-21 Thread Antoine Pitrou
Changes by Antoine Pitrou : -- versions: +Python 3.7 ___ Python tracker ___ ___

[issue31539] asyncio.sleep may sleep less time then it should

2017-09-21 Thread Antoine Pitrou
Antoine Pitrou added the comment: I don't think the bug is about real time here, rather about minimal sleep time expectations; i.e. it's expected that the sleep time may be *more* than asked for, but not less than. (and I would share that expectation myself) --

[issue31539] asyncio.sleep may sleep less time then it should

2017-09-21 Thread STINNER Victor
STINNER Victor added the comment: Technically, asyncii cannot wait exactly 100 ms on Windows. It will be more likely a sleep between 100-15 ms and 100+15 ms. Real time is really a complex topic. CPython with its stop-the-world garbage collector are not designed for real time. --

[issue26103] Contradiction in definition of "data descriptor" between (dotted lookup behavior/datamodel documentation) and (inspect lib/descriptor how-to)

2017-09-21 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: The only question is remained -- should *data descriptors* be *descriptors*? I.e. is the __get__ method required for data descriptors? -- ___ Python tracker

Re: Convert pandas series to string and datetime object

2017-09-21 Thread Peter Otten
zljubi...@gmail.com wrote: > I have sliced the pandas dataframe > > end_date = df[-1:]['end'] > > type(end_date) > Out[4]: pandas.core.series.Series > > end_date > Out[3]: > 48173 2017-09-20 04:47:59 > Name: end, dtype: datetime64[ns] > > 1.How to get rid of index value 48173 and get

[issue31452] asyncio.gather does not cancel tasks if one fails

2017-09-21 Thread Yury Selivanov
Yury Selivanov added the comment: I looked at the PR, and I'm not so sure about this change. In short, it can be viewed as a backwards incompatible change to asyncio.gather. Guido, what do you think? -- nosy: +gvanrossum ___ Python tracker

Re: Convert pandas series to string and datetime object

2017-09-21 Thread MRAB
On 2017-09-21 20:27, zljubi...@gmail.com wrote: I have sliced the pandas dataframe end_date = df[-1:]['end'] type(end_date) Out[4]: pandas.core.series.Series end_date Out[3]: 48173 2017-09-20 04:47:59 Name: end, dtype: datetime64[ns] 1. How to get rid of index value 48173 and get only

[issue31153] Update docstrings of itertools functions

2017-09-21 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: For groupby() see also issue27385. -- ___ Python tracker ___ ___

[issue30346] Odd behavior when unpacking `itertools.groupby`

2017-09-21 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Ping. Can you make your decision Raymond? This issue is a stopper for issue30347 which fixes a crash. I don't want to merge the fix for issue30347 until this issue be solved, because both proposed PRs solve issue30347 too, and I don't want to make unneeded

Re: iPython ? magic

2017-09-21 Thread Pavol Lisy
On 9/21/17, Steve D'Aprano wrote: > In the iPython interactive interpreter, obj? prints information about the > given > object. For example: > > > In [11]: None? > Type: NoneType > Base Class: > String Form:None > Namespace: Python builtin > Docstring: > > >

Re: Test Bank for Management, Operations Management, Supply Chain Management, Project Management for all editions

2017-09-21 Thread louisacorey
Organizational Behavior and Management, 11th Edition by Robert Konopaske and John Ivancevich and Michael Matteson -- https://mail.python.org/mailman/listinfo/python-list

[issue31543] Optimize wrapper descriptors using FASTCALL

2017-09-21 Thread Raymond Hettinger
Raymond Hettinger added the comment: This seems like a straight-forward win. I don't think we really need to see microbenchmarks before going forward with this one. -- nosy: +rhettinger ___ Python tracker

Re: Re: errors with json.loads

2017-09-21 Thread john polo
On 9/21/2017 10:11 AM, Ned Batchelder wrote: I can only assume that the actual data being read is different than the data they put into the message here. --Ned. There was a typo in the file that I had made and saved; an extra comma before one of the ":". Apologies to the list for not

Convert pandas series to string and datetime object

2017-09-21 Thread zljubisic
I have sliced the pandas dataframe end_date = df[-1:]['end'] type(end_date) Out[4]: pandas.core.series.Series end_date Out[3]: 48173 2017-09-20 04:47:59 Name: end, dtype: datetime64[ns] 1. How to get rid of index value 48173 and get only "2017-09-20 04:47:59" string? I have to call

Re: How does CPython build it's NEWS or changelog?

2017-09-21 Thread Ben Finney
Stefan Behnel writes: > https://docs.python.org/devguide/committing.html#what-s-new-and-news-entries > > https://github.com/larryhastings/blurb Also of interest is the more general-use Town Crier tool: towncrier is a utility to produce useful, summarised news files for

Re: [Tutor] beginning to code

2017-09-21 Thread Bill
Stefan Ram wrote: bartc writes: On 20/09/2017 02:31, Bill wrote: it's implementation, I would say that C++ has it all over Python from the point of view of "intuitiveness". It's much easier to tell what's going on, at a glance, in a C++ program. You're being serious, aren't

[ANN] PyInstaller 3.3

2017-09-21 Thread Hartmut Goebel
Hello, on behalf of the PyInstaller development team I'm happy to announce PyInstaller 3.3. Most important change for this release is the support for Python 3.6. http://www.pyinstaller.org Thanks for all those who contributed questions, bug-reports or pull-requests. === What it is ===

Re: Assertions

2017-09-21 Thread Chris Angelico
On Fri, Sep 22, 2017 at 3:49 AM, Steve D'Aprano wrote: > On Fri, 22 Sep 2017 03:31 am, Chris Angelico wrote: > >> Impressive. That means that, in 2.7, it's actually equivalent to: >> > def test3(): >> ... if not foo: raise AssertionError, "bar baz" > > That's

[issue1612262] Class Browser doesn't show internal classes

2017-09-21 Thread Terry J. Reedy
Terry J. Reedy added the comment: I am revising the codecontext patch to use comprehensions and the sort key option. I will rename the new function 'collect_objects' (GPolo) / '_traverse_node' (CSabella) as 'list_children' and have it return the name-object list, ordered by line number,

Re: Assertions

2017-09-21 Thread Steve D'Aprano
On Fri, 22 Sep 2017 03:31 am, Chris Angelico wrote: > On Fri, Sep 22, 2017 at 3:23 AM, Steve D'Aprano > wrote: >> That is definitely version-dependent, because I've just tried it and got >> different byte-code in Python 2.7. >> >> py> import dis >> py> def test1(): >>

Re: Assertions

2017-09-21 Thread Steve D'Aprano
On Fri, 22 Sep 2017 02:29 am, Tobiah wrote: > Are these completely equivalent? > > def foo(thing): > > assert(thing > 0), "Thing must be greater than zero" > > > def foo(thing): > > if not (thing > 0): raise AssertionError("Thing must be greater than > zero") > > >

Re: Old Man Yells At Cloud

2017-09-21 Thread Chris Angelico
On Fri, Sep 22, 2017 at 3:07 AM, Rhodri James wrote: > On 21/09/17 17:31, Chris Angelico wrote: >> >> For a good while, I was in the same position. But instead of massively >> rewriting everything, all I did was to adjust the material to use >> Py2/Py3 compatible syntax.

Re: Assertions

2017-09-21 Thread Chris Angelico
On Fri, Sep 22, 2017 at 3:23 AM, Steve D'Aprano wrote: > That is definitely version-dependent, because I've just tried it and got > different byte-code in Python 2.7. > > py> import dis > py> def test1(): > ... assert foo, "bar baz" > ... > py> def test2(): > ...

Re: Assertions

2017-09-21 Thread Steve D'Aprano
On Fri, 22 Sep 2017 02:59 am, Ned Batchelder wrote: > On 9/21/17 12:29 PM, Tobiah wrote: >> Are these completely equivalent? [... assert, versus test and raise AssertionError ...] > Let's see: [...] > Yes, they are completely equivalent, compiling to precisely the same > bytecode. That is

[issue27099] IDLE: turn built-in extensions into regular modules

2017-09-21 Thread Terry J. Reedy
Terry J. Reedy added the comment: Two of the TODOs already listed, and 2 more found in review, have been done. With these additions, I felt IDLE was ready for the 3.6.3rc1 and 3.7.0a1 releases last Monday. #31502 Fix problem with deleting user themes and keysets. #31480 Disable ZzDummy by

Re: Old Man Yells At Cloud

2017-09-21 Thread Rhodri James
On 21/09/17 17:31, Chris Angelico wrote: For a good while, I was in the same position. But instead of massively rewriting everything, all I did was to adjust the material to use Py2/Py3 compatible syntax. Adding parens around your print calls won't stop it from being Py2-compatible, and it means

[issue31288] IDLE tests: don't modify tkinter.messagebox.

2017-09-21 Thread Terry J. Reedy
Terry J. Reedy added the comment: Make sure to return result of messagebox calls, as did in #31287, fixed in #31502. -- ___ Python tracker ___

[issue31443] Possibly out of date C extension documentation

2017-09-21 Thread Stefan Krah
Stefan Krah added the comment: In fact, building _decimal should also fail on Cygwin if this were still an issue. -- ___ Python tracker ___

Re: Assertions

2017-09-21 Thread Ned Batchelder
On 9/21/17 12:29 PM, Tobiah wrote: Are these completely equivalent? def foo(thing): assert(thing > 0), "Thing must be greater than zero" def foo(thing): if not (thing > 0): raise AssertionError("Thing must be greater than zero") Other than the fact that the assertion

[issue31547] IDLE: Save definitions added to user keysets

2017-09-21 Thread Terry J. Reedy
New submission from Terry J. Reedy: User keysets are saved as a complete keyset, but users could edit the file and delete event-sequence pairs or add an incomplete set. When a keyset is used, default pairs are added for any that are missing, if the pair does not conflict with existing pairs.

[issue31443] Possibly out of date C extension documentation

2017-09-21 Thread Stefan Krah
Stefan Krah added the comment: Erik, if you are interested in Cygwin, could you please check that xxmodule.c builds on Cygwin with the patch? You need to uncomment a couple of lines in setup.py to build 'xx'. -- ___ Python tracker

[issue31543] Optimize wrapper descriptors using FASTCALL

2017-09-21 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: It optimizes the same cases as bpo-31410. bpo-31410 removed a half of the overhead for wrapper descriptors, Victor's patch removes the remaining half. Actually it makes calling the descriptor faster than calling the corresponding builtin! But bpo-31410

[issue31443] Possibly out of date C extension documentation

2017-09-21 Thread Stefan Krah
Changes by Stefan Krah : -- keywords: +patch pull_requests: +3678 stage: -> patch review ___ Python tracker ___

[issue31543] Optimize wrapper descriptors using FASTCALL

2017-09-21 Thread STINNER Victor
STINNER Victor added the comment: > I don't know. What's the point of optimizing `array.array.__len__(obj)`? > People usually call `len(obj)` for that... Right, type.method(self) is less than common than self.method(). I looked at the stdlib. I found that the following method are called using

iPython ? magic

2017-09-21 Thread Steve D'Aprano
In the iPython interactive interpreter, obj? prints information about the given object. For example: In [11]: None? Type: NoneType Base Class: String Form:None Namespace: Python builtin Docstring: Does anyone know that the Namespace field is supposed to show? I can't get it to

Re: errors with json.loads

2017-09-21 Thread Ned Batchelder
On 9/21/17 12:18 PM, john polo wrote: Bill, Thanks for the reply. I wasn't sure how to get Python 2 through the cmd or IPython, so I went through ArcGIS, but it's mostly the same result: >>> file = open('books.json','r') >>> text = file.read() >>> text = json.loads(text) After the

Re: Old Man Yells At Cloud

2017-09-21 Thread Chris Angelico
On Fri, Sep 22, 2017 at 1:59 AM, Rhodri James wrote: > On 21/09/17 16:12, Steve D'Aprano wrote: >> >> On Thu, 21 Sep 2017 08:19 pm, Rhodri James wrote: >> >>> (That's basically my gripe against print becoming a function in Python3. >>>It makes a lot of sense as has

Assertions

2017-09-21 Thread Tobiah
Are these completely equivalent? def foo(thing): assert(thing > 0), "Thing must be greater than zero" def foo(thing): if not (thing > 0): raise AssertionError("Thing must be greater than zero") Other than the fact that the assertion can be turned off with -O? Thanks,

New security-annou...@python.org mailing list

2017-09-21 Thread Barry Warsaw
I’m happy to announce the availability of a new mailing list, with the mission of providing security announcements to the Python community from the Python Security Response Team (PSRT): security-annou...@python.org You can sign up in the usual Mailman way:

[issue31546] PyOS_InputHook is not called when waiting for input() in Windows

2017-09-21 Thread Steve Dower
Steve Dower added the comment: (Belongs inside Parser/myreadline.c in the _PyOS_WindowsConsoleReadline function) -- ___ Python tracker ___

[issue31493] IDLE cond context: fix code update and font update timers

2017-09-21 Thread Terry J. Reedy
Terry J. Reedy added the comment: The underlying issue is trying to coordinate two somewhat independent object systems (Python and Tcl). I don't know why the after loops were (apparently) stopped before #27099 and not after. The only difference I know of is the dropping of the reference to

Re: Re: errors with json.loads

2017-09-21 Thread john polo
On 9/21/2017 4:24 AM, Thomas Jollans wrote: It looks to me like the root cause of the problem was that they copied the code from a web page, and the web page contained invalid JSON. Thank you, Thomas. John -- https://mail.python.org/mailman/listinfo/python-list

[issue31539] asyncio.sleep may sleep less time then it should

2017-09-21 Thread Mikhail Gerasimov
Mikhail Gerasimov added the comment: STINNER Victor, thanks for explanation! I don't know if this issue has practical disadvantages, but such behavior seems to be confusing, especially, since it can be reproduced with event_loop.time() and asyncio doc says nothing about resolution -

Re: Re: errors with json.loads

2017-09-21 Thread john polo
On 9/20/2017 6:40 PM, Dennis Lee Bieber wrote: On Wed, 20 Sep 2017 17:13:41 -0500, john polo declaimed the following: and the example code for reading the file is: file = open('books.json','r') What encoding is the file? I did a cut from your post into a file,

[issue31546] PyOS_InputHook is not called when waiting for input() in Windows

2017-09-21 Thread Steve Dower
Steve Dower added the comment: You're right, we're missing this section of code: if (PyOS_InputHook != NULL) (void)(PyOS_InputHook)(); Since we just call it and ignore anything it does, it should be safe enough to add it immediately before the ReadConsoleW call (inside the

[issue31529] IDLE: Add docstrings and tests for editor.py reload functions

2017-09-21 Thread Terry J. Reedy
Terry J. Reedy added the comment: A good start, and big enough as it is, for the next big revision project ;-). -- versions: +Python 3.6 ___ Python tracker

Re: Re: errors with json.loads

2017-09-21 Thread john polo
On 9/20/2017 5:58 PM, Bill wrote: Interesting problem, John. I have probably even less experience with json than you do, so I'm taking this as an opportunity to learn with you. Suggestions: 1. Try your example with Python 2 rather than Python 3. Bill, Thanks for the reply. I wasn't sure

Re: Re: errors with json.loads

2017-09-21 Thread john polo
On 9/20/2017 5:56 PM, John Gordon wrote: In john polo writes: JSONDecodeError: Expecting ':' delimiter: line 5 column 50 (char 161) ?json.loads says that the method is for deserializing "s", with "s" being a string,

[issue31546] PyOS_InputHook is not called when waiting for input() in Windows

2017-09-21 Thread Lam Yuen Hei
Lam Yuen Hei added the comment: Attach python 3.6 call stack of the test script -- Added file: https://bugs.python.org/file47162/py36_call_stack.png ___ Python tracker

[issue31546] PyOS_InputHook is not called when waiting for input() in Windows

2017-09-21 Thread Lam Yuen Hei
Lam Yuen Hei added the comment: Attach python 3.5 call stack of the test script -- Added file: https://bugs.python.org/file47161/py35_call_stack.png ___ Python tracker

[issue31545] Fixing documentation for timedelta.

2017-09-21 Thread Utkarsh Upadhyay
Changes by Utkarsh Upadhyay : -- keywords: +patch pull_requests: +3676 stage: -> patch review ___ Python tracker ___

[issue31546] PyOS_InputHook is not called when waiting for input() in Windows

2017-09-21 Thread Lam Yuen Hei
New submission from Lam Yuen Hei: Since python 3.6, PyOS_InputHook is not called when waiting for IO in Windows. This causes issues with GUI framework like tkinter that relys on PyOS_InputHook to handle user interaction. I attached a test script. When running the script with python 3.5, the

[issue30302] Improve .__repr__ implementation for datetime.timedelta

2017-09-21 Thread Utkarsh Upadhyay
Changes by Utkarsh Upadhyay : -- keywords: +patch pull_requests: +3677 stage: -> patch review ___ Python tracker ___

Re: Old Man Yells At Cloud

2017-09-21 Thread Rhodri James
On 21/09/17 16:12, Steve D'Aprano wrote: On Thu, 21 Sep 2017 08:19 pm, Rhodri James wrote: (That's basically my gripe against print becoming a function in Python3. It makes a lot of sense as has already been pointed out, but it breaks every beginners tutorial.) Nobody made that decision

[issue31545] Fixing documentation for timedelta.

2017-09-21 Thread Utkarsh Upadhyay
New submission from Utkarsh Upadhyay: There are some instances in the documentation of datetime where the repr of timedelta is mentioned, which was changed in bpo-30302. Am making a PR shortly to address them. -- assignee: docs@python components: Documentation messages: 302700 nosy:

[issue31539] asyncio.sleep may sleep less time then it should

2017-09-21 Thread STINNER Victor
STINNER Victor added the comment: Clocks is a very complex topic, especially when you care of portability. See my PEP 418. asyncio uses time.monotonic() clock to not be impacted when the system clock ("wall clock") is updated by the administrator or automatically by NTP. On Windows,

[issue31539] asyncio.sleep may sleep less time then it should

2017-09-21 Thread Antoine Pitrou
Antoine Pitrou added the comment: AFAIR the Windows clock has a 15ms granularity, so I'm not really surprised. In other words, I don't think `asyncio.sleep` sleeps less than expected, but that it's the imprecision of time.time() which gives you that impression. What happens if you replace

[issue31543] Optimize wrapper descriptors using FASTCALL

2017-09-21 Thread Antoine Pitrou
Antoine Pitrou added the comment: > First I would like to know if it's worth it I don't know. What's the point of optimizing `array.array.__len__(obj)`? People usually call `len(obj)` for that... -- nosy: +pitrou ___ Python tracker

New security-annou...@python.org mailing list

2017-09-21 Thread Barry Warsaw
I’m happy to announce the availability of a new mailing list, with the mission of providing security announcements to the Python community from the Python Security Response Team (PSRT): security-annou...@python.org You can sign up in the usual Mailman way:

[issue31544] gettext.Catalog title is not flagged as a class

2017-09-21 Thread linkid
New submission from linkid: In the ``gettext`` documentatino, in the title about the ``Catalog`` constructor, ``Catalog`` is not flagged as a class. -- assignee: docs@python components: Documentation messages: 302696 nosy: docs@python, linkid priority: normal severity: normal status:

[issue31500] IDLE: Tiny font on HiDPI display

2017-09-21 Thread Terry J. Reedy
Terry J. Reedy added the comment: New changeset 0c4997f1919d8583353b12537a63dcbe7b9d280f by Terry Jan Reedy in branch '3.6': [3.6] bpo-31500: IDLE: Scale default fonts on HiDPI displays. (GH-3639) (#3686) https://github.com/python/cpython/commit/0c4997f1919d8583353b12537a63dcbe7b9d280f

Re: Old Man Yells At Cloud

2017-09-21 Thread Steve D'Aprano
On Thu, 21 Sep 2017 08:19 pm, Rhodri James wrote: > (That's basically my gripe against print becoming a function in Python3. > It makes a lot of sense as has already been pointed out, but it breaks > every beginners tutorial.) Nobody made that decision lightly. It wasn't a spur of the moment

Re: errors with json.loads

2017-09-21 Thread Ned Batchelder
On 9/20/17 10:35 PM, Bill wrote: Ned Batchelder wrote: On 9/20/17 8:22 PM, Bill wrote: Apparenty an \xa0 byte corresponds to a "non-breaking space". What sort of white space characters are allowed in a json file ( tabs and newlines?)?  Just curious. These things can be looked up.  From

[issue27867] various issues due to misuse of PySlice_GetIndicesEx

2017-09-21 Thread Henk-Jaap Wagenaar
Henk-Jaap Wagenaar added the comment: @serhiy.storchaka: review done. -- nosy: +Henk-Jaap Wagenaar ___ Python tracker ___

The Signature Module for PySide2

2017-09-21 Thread Christian Tismer
Hi friends, there is the new signature module for PySide2. It adds the __signature__ attribute to all PySide2 functions and constructors. Example usage: >>> PySide2.QtWidgets.QGraphicsAnchorLayout.addAnchors.__signature__ >>> PySide2.QtWidgets.QGraphicsAnchorLayout.__signature__ will print all

PyDev 6.0.0 Released

2017-09-21 Thread Fabio Zadrozny
PyDev 6.0.0 Release Highlights - *Important* PyDev now requires Java 8 and Eclipse 4.6 (Neon) onwards. - PyDev 5.2.0 is the last release supporting Eclipse 4.5 (Mars). - *Interpreter configuration* - The *list of packages* installed in the interpreter is shown in the IDE

[issue31539] asyncio.sleep may sleep less time then it should

2017-09-21 Thread R. David Murray
R. David Murray added the comment: I can't reproduce this on a linux VM with 3.7 tip. I don't currently have a windows instance to test against. -- nosy: +r.david.murray ___ Python tracker

[issue31500] IDLE: Tiny font on HiDPI display

2017-09-21 Thread Terry J. Reedy
Changes by Terry J. Reedy : -- pull_requests: +3675 ___ Python tracker ___ ___

PyDev 6.0.0 Released

2017-09-21 Thread Fabio Zadrozny
PyDev 6.0.0 Release Highlights - *Important* PyDev now requires Java 8 and Eclipse 4.6 (Neon) onwards. - PyDev 5.2.0 is the last release supporting Eclipse 4.5 (Mars). - *Interpreter configuration* - The *list of packages* installed in the interpreter is shown in the IDE

Re: Easy way to get a list of tuples.

2017-09-21 Thread Thomas Jollans
On 2017-09-21 12:38, Sayth Renshaw wrote: > Thanks Thomas yes you are right with append. I have tried it but just can't > get it yet as append takes only 1 argument and I wish to give it 3. > > I am really having trouble creating the groups of 3, since I am getting one > consistent stream. I

[issue31543] Optimize wrapper descriptors using FASTCALL

2017-09-21 Thread STINNER Victor
Changes by STINNER Victor : -- keywords: +patch pull_requests: +3674 stage: -> patch review ___ Python tracker ___

[issue31543] Optimize wrapper descriptors using FASTCALL

2017-09-21 Thread STINNER Victor
New submission from STINNER Victor: Attached pull request adds a fastpath for wrapper descriptors to use the FASTCALL calling convention. It's a follow up of bpo-31410 and all my work on FASTCALL during Python 3.6 and 3.7 development cycles. Microbenchmark: ./python -m perf timeit -s 'import

[issue27541] Repr of collection's subclasses

2017-09-21 Thread STINNER Victor
STINNER Victor added the comment: > Because reprs of Python implementations of collection use a bare __name__. Ah, maybe this module should be updated to use qualified name with the name in repr()? > __qualname__ is used only in combination with __module__. I was thinking at module.qualname,

[issue27541] Repr of collection's subclasses

2017-09-21 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Because reprs of Python implementations of collection use a bare __name__. __qualname__ is used only in combination with __module__. Using a single __qualname__ can be confused: foo.bar looks as a name bar in the module foo. Whether in reprs and error

Re: Easy way to get a list of tuples.

2017-09-21 Thread Mark Lawrence via Python-list
On 21/09/2017 11:18, Sayth Renshaw wrote: Hi I have been toying with json and I particular area where I cannot get the desired result a list of tuples as my return. The json from the API is way to long but I don't think it will matter. .. hitting url data = r.json() for item in

[issue27541] Repr of collection's subclasses

2017-09-21 Thread STINNER Victor
STINNER Victor added the comment: Why using type.__name__ rather than type.__qualname__? -- nosy: +haypo ___ Python tracker ___

  1   2   >