Re: Format list of list sub elements keeping structure.

2018-07-23 Thread Sayth Renshaw
On Tuesday, 24 July 2018 14:25:48 UTC+10, Rick Johnson wrote: > Sayth Renshaw wrote: > > > elements = [['[{0}]'.format(element) for element in elements]for elements > > in data] > > I would suggest you avoid list comprehensions until you master long-form > loops. I actually have the answer

[issue34177] test_site fails in macOS-PR VSTS builds for 3.7 branch

2018-07-23 Thread INADA Naoki
Change by INADA Naoki : -- keywords: +patch pull_requests: +7956 stage: -> patch review ___ Python tracker ___ ___

Re: Format list of list sub elements keeping structure.

2018-07-23 Thread Sayth Renshaw
On Tuesday, 24 July 2018 14:25:48 UTC+10, Rick Johnson wrote: > Sayth Renshaw wrote: > > > elements = [['[{0}]'.format(element) for element in elements]for elements > > in data] > > I would suggest you avoid list comprehensions until you master long-form > loops. My general issue is that I

Re: Format list of list sub elements keeping structure.

2018-07-23 Thread Sayth Renshaw
I am very close to the end result. I now have it as Output [ ['[glossary]'], ['[glossary]', '[title]'], ['[glossary]', '[GlossDiv]'], ['[glossary]', '[GlossDiv]', '[title]'], ['[glossary]', '[GlossDiv]', '[GlossList]'], ['[glossary]', '[GlossDiv]', '[GlossList]',

[issue34199] Add support for delete logger in log module.

2018-07-23 Thread Chetan kolhe
Chetan kolhe added the comment: Hi Loggers are static objects managed by the module itself. When you create one, it won't be removed until you leave the shell all logger instance is stored in this location. "Logger.manager.loggerDict" which is the dictionary. we can delete logger instance

[issue33073] Add as_integer_ratio() to int() objects

2018-07-23 Thread Raymond Hettinger
Change by Raymond Hettinger : -- assignee: Nofar Schnider -> lisroach nosy: +lisroach ___ Python tracker ___ ___ Python-bugs-list

[issue34149] Behavior of the min/max with key=None

2018-07-23 Thread Raymond Hettinger
Raymond Hettinger added the comment: Alexander, thanks for the suggestion and patch. -- components: +Library (Lib) resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker

[issue34149] Behavior of the min/max with key=None

2018-07-23 Thread Raymond Hettinger
Raymond Hettinger added the comment: New changeset e22072fb11246f125aa9ff7629c832b9e2407ef0 by Raymond Hettinger (Alexander Marshalov) in branch 'master': bpo-34149: Behavior of the min/max with key=None (GH-8328)

[issue34202] 3.6 ZipFile fails with Path

2018-07-23 Thread Berker Peksag
Berker Peksag added the comment: Thanks for the report! Support for path-like objects was added in 3.6.2. I think you either have 3.6.0 or 3.6.1 installed on your system. Please upgrade it to the latest bugfix release. With 3.6.6, I got the following results: >>> import zipfile >>> from

[issue34198] Additional encoding options to tkinter.filedialog

2018-07-23 Thread Narito Takizawa
Change by Narito Takizawa : -- pull_requests: +7955 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue34202] 3.6 ZipFile fails with Path

2018-07-23 Thread bbayles
Change by bbayles : -- nosy: +bbayles ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

Re: Format list of list sub elements keeping structure.

2018-07-23 Thread Sayth Renshaw
> > > > for item in data: > > for elem in item: > > out = ("[{0}]").format(elem) > > print(out) > > Hint: print implicitly adds a newline to the output string. So collect all > the values of each sublist and print a line-at-time to output, or use the > end= argument of Py3's

[issue34198] Additional encoding options to tkinter.filedialog

2018-07-23 Thread Narito Takizawa
Change by Narito Takizawa : -- pull_requests: -7938 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

Re: curses, ncurses or something else

2018-07-23 Thread eryk sun
On Mon, Jul 23, 2018 at 10:24 PM, John Pote wrote: > > So I thought it might be quick and easy to do something with curses to keep > the title line visable while the numbers roll up the screen. But alas I'm a > Windows user and the 'curses' module is not in the Windows standard library > for

[issue34203] documentation: recommend Python 3 over 2 in faq

2018-07-23 Thread Mariatta Wijaya
Mariatta Wijaya added the comment: Yep. Please propose a patch. I think this should be updated even for Python 2.7 docs, which is nearing EOL. -- nosy: +Mariatta stage: -> needs patch versions: +Python 2.7, Python 3.6, Python 3.7 ___ Python

Format list of list sub elements keeping structure.

2018-07-23 Thread Sayth Renshaw
I have data which is a list of lists of all the full paths in a json document. How can I change the format to be usable when selecting elements? data = [['glossary'], ['glossary', 'title'], ['glossary', 'GlossDiv'], ['glossary', 'GlossDiv', 'title'], ['glossary', 'GlossDiv', 'GlossList'],

[issue34203] documentation: recommend Python 3 over 2 in faq

2018-07-23 Thread abcdef
New submission from abcdef : FAQ "How stable is Python" https://docs.python.org/3/faq/general.html#how-stable-is-python; states "There are two recommended production-ready versions at this point in time, because at the moment there are two branches of stable releases: 2.x and 3.x. Python

Re: Python 2.7.14 and Python 3.6.0 netcdf4

2018-07-23 Thread MRAB
On 2018-07-23 23:39, jorge.conr...@cptec.inpe.br wrote: Hi, Please someone can help me with this error message; for Python 2.7.14 I did: from netCDF4 import Dataset and I didn't have no message That's because you've installed netCDF4 for Python 2.7.

Re: Python 2.7.14 and Python 3.6.0 netcdf4

2018-07-23 Thread Steven D'Aprano
On Mon, 23 Jul 2018 19:39:18 -0300, jorge.conrado wrote: > Traceback (most recent call last): > File "", line 1, in > ModuleNotFoundError: No module named 'netCDF4' > > > What can I do to solve this error for Python 3.6.0 Just because you have the Python 2.7 version of

Re: Python 2.7.14 and Python 3.6.0 netcdf4

2018-07-23 Thread Thomas Jollans
On 24/07/18 00:39, jorge.conr...@cptec.inpe.br wrote: > from netCDF4 import Dataset > > I had: > > Traceback (most recent call last): > File "", line 1, in > ModuleNotFoundError: No module named 'netCDF4' > > > What can I do to solve this error for Python 3.6.0

[issue34202] 3.6 ZipFile fails with Path

2018-07-23 Thread Michael Kleehammer
New submission from Michael Kleehammer : ZipFile is documented to accept "path-like" objects but is failing when I try to create one. I've distilled it down to this small test: import zipfile from pathlib import Path path = Path('test.zip') zf = zipfile.ZipFile(path, 'w')

Re: curses, ncurses or something else

2018-07-23 Thread Thomas Jollans
On 24/07/18 00:24, John Pote wrote: > Ideas invited. This doesn't answer your question at all, but when I want a small script to produce largish streams of numbers, I write them to a (csv) file and plot them using matplotlib then and there. --

Re: curses, ncurses or something else

2018-07-23 Thread Dale Marvin via Python-list
On 7/23/18 3:24 PM, John Pote wrote: I recently wrote a command line app to take a stream of numbers, do some signal processing on them and display the results on the console. There may be several output columns of data so a title line is printed first. But the stream of numbers may be several

[issue13407] tarfile doesn't support multistream bzipped tar files

2018-07-23 Thread Andrés Delfino
Change by Andrés Delfino : -- keywords: +patch pull_requests: +7954 stage: needs patch -> patch review ___ Python tracker ___ ___

Re: curses, ncurses or something else

2018-07-23 Thread Rich Shepard
On Mon, 23 Jul 2018, John Pote wrote: So I thought it might be quick and easy to do something with curses to keep the title line visable while the numbers roll up the screen. But alas I'm a Windows user and the 'curses' module is not in the Windows standard library for Python. John, I

Re: Python shuts down when I try to run a module

2018-07-23 Thread Michael Torrie
On 07/23/2018 01:00 AM, Lyra wrote: > Hello, > I’ve just started to learn Python coding, and downloaded version 3.7.0 from > the website.  I’ve written 5 or 6 small programs and saved them, but whenever > I try to run them, Python doesn’t work right.  The user answers the first > question and

Python 2.7.14 and Python 3.6.0 netcdf4

2018-07-23 Thread jorge . conrado
Hi, Please someone can help me with this error message; for Python 2.7.14 I did: from netCDF4 import Dataset and I didn't have no message But, for Python 3.6.0 from netCDF4 import Dataset I had: Traceback (most recent call last):

[issue34084] possible free statically allocated string in compiler when easter egg on

2018-07-23 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: New changeset ec729d5407adafaae566136448ef0551bb29c070 by Serhiy Storchaka (Miss Islington (bot)) in branch '3.6': bpo-34084: Fix setting an error message for the "Barry as BDFL" easter egg. (GH-8262) (GH-8424)

curses, ncurses or something else

2018-07-23 Thread John Pote
I recently wrote a command line app to take a stream of numbers, do some signal processing on them and display the results on the console. There may be several output columns of data so a title line is printed first. But the stream of numbers may be several hundred long and the title line

Re: ongoing browser projects

2018-07-23 Thread Akkana Peck
> > On 23/07/18 03:43, Akkana Peck wrote: > >> You'd think there would be something newer (ideally > >> based on Blink) that worked with GTK3/GIO, but I never found anything. Thomas Jollans writes: > > This gi-based example looks like Gtk3, right? > >

[issue34084] possible free statically allocated string in compiler when easter egg on

2018-07-23 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: New changeset 220afffb683af1ba9e04c37535cfaa41348e9ebb by Serhiy Storchaka (Miss Islington (bot)) in branch '3.7': bpo-34084: Fix setting an error message for the "Barry as BDFL" easter egg. (GH-8262) (GH-8423)

[issue34183] Lib/test/test_contextlib_async.py failed when ran as a script

2018-07-23 Thread Serhiy Storchaka
Change by Serhiy Storchaka : -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker ___

[issue34184] Lib/test/test_dataclasses.py failed when ran as a script

2018-07-23 Thread Serhiy Storchaka
Change by Serhiy Storchaka : -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker ___

[issue34183] Lib/test/test_contextlib_async.py failed when ran as a script

2018-07-23 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: New changeset 519fc551d7778ac698033846bb052a12b7d491e2 by Serhiy Storchaka (Miss Islington (bot)) in branch '3.7': bpo-34183: Fix running Lib/test/test_contextlib_async.py as a script. (GH-8381) (GH-8422)

[issue30863] Rewrite PyUnicode_AsWideChar() and PyUnicode_AsWideCharString()

2018-07-23 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Only after removing PyUnicode_AsUnicodeAndSize() and related PyArg_ParseTuple codes. -- ___ Python tracker ___

[issue34190] x86 Gentoo Refleaks 3.x: test_sys_setprofile leaked [1, 1, 1] references, sum=3

2018-07-23 Thread STINNER Victor
STINNER Victor added the comment: Thanks Jeroen Demeyer for the good and quick fix! I applied it to 3.7 and master branches. -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker

[issue34190] x86 Gentoo Refleaks 3.x: test_sys_setprofile leaked [1, 1, 1] references, sum=3

2018-07-23 Thread STINNER Victor
STINNER Victor added the comment: New changeset 25b87d35675301a929982db6d3783af4f715 by Victor Stinner (Miss Islington (bot)) in branch '3.7': bpo-34190: Fix reference leak in call_function() (GH-8413) (GH-8418)

[issue30863] Rewrite PyUnicode_AsWideChar() and PyUnicode_AsWideCharString()

2018-07-23 Thread STINNER Victor
STINNER Victor added the comment: Would it be possible to remove the wchar_t* cache? -- ___ Python tracker ___ ___

[issue33468] Add try-finally contextlib.contextmanager example

2018-07-23 Thread Tal Einat
Tal Einat added the comment: Thanks for the PR, Matthias Bussonnier! -- nosy: +mbussonn resolution: -> fixed stage: patch review -> resolved status: open -> closed versions: +Python 2.7 ___ Python tracker

[issue33468] Add try-finally contextlib.contextmanager example

2018-07-23 Thread Tal Einat
Tal Einat added the comment: New changeset 4e166ffd29b675238ccd94964743f6cb206d2235 by Tal Einat (Miss Islington (bot)) in branch '3.7': bpo-33468: Add try-finally contextlib.contextmanager example (GH-7816) (GH-8425)

[issue33468] Add try-finally contextlib.contextmanager example

2018-07-23 Thread Tal Einat
Tal Einat added the comment: New changeset 5b3643d1a5114551350a9d17fb0aaab2d503c290 by Tal Einat (Miss Islington (bot)) in branch '3.6': bpo-33468: Add try-finally contextlib.contextmanager example (GH-7816) (GH-8426)

[issue33468] Add try-finally contextlib.contextmanager example

2018-07-23 Thread Tal Einat
Tal Einat added the comment: New changeset f7e60a69485097dc28f000c55615038278f84333 by Tal Einat in branch '2.7': [2.7] bpo-33468: Add try-finally contextlib.contextmanager example (GH-7816) (GH-8427) https://github.com/python/cpython/commit/f7e60a69485097dc28f000c55615038278f84333

[issue34021] [2.7] test_regrtest: test_env_changed() fails on x86 Windows XP VS9.0 2.7

2018-07-23 Thread Pablo Galindo Salgado
Pablo Galindo Salgado added the comment: Another failure in sx86 Windows XP VS9.0 2.7: https://buildbot.python.org/all/#/builders/105/builds/195 Total duration: 28 min 12 sec Tests result: FAILURE then FAILURE test test_regrtest failed -- Traceback (most recent call last): File

[issue34184] Lib/test/test_dataclasses.py failed when ran as a script

2018-07-23 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: New changeset 635338248f967728f13b7bc4b9969aedff51eef6 by Serhiy Storchaka (Miss Islington (bot)) in branch '3.7': bpo-34184: Fix running Lib/test/test_dataclasses.py as a script. (GH-8382) (GH-8421)

Re: Non-GUI, single processort inter process massaging - how?

2018-07-23 Thread Chris Green
Anders Wegge Keller wrote: > På Sat, 21 Jul 2018 09:07:23 +0100 > Chris Green skrev: > > > So - what's the best approach to this? I've done some searching and > > most/many of the solutions seem rather heavyweight for my needs. Am I > > overlooking something obvious or should I try rethinking

[issue33468] Add try-finally contextlib.contextmanager example

2018-07-23 Thread Tal Einat
Change by Tal Einat : -- pull_requests: +7953 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue33468] Add try-finally contextlib.contextmanager example

2018-07-23 Thread miss-islington
Change by miss-islington : -- pull_requests: +7952 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue33468] Add try-finally contextlib.contextmanager example

2018-07-23 Thread Tal Einat
Tal Einat added the comment: New changeset bde782bb594edffeabe978abeee2b7082ab9bc2a by Tal Einat (Matthias Bussonnier) in branch 'master': bpo-33468: Add try-finally contextlib.contextmanager example (GH-7816) https://github.com/python/cpython/commit/bde782bb594edffeabe978abeee2b7082ab9bc2a

[issue33468] Add try-finally contextlib.contextmanager example

2018-07-23 Thread miss-islington
Change by miss-islington : -- pull_requests: +7951 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue32500] PySequence_Length() raises TypeError on dict type

2018-07-23 Thread Serhiy Storchaka
Change by Serhiy Storchaka : -- resolution: -> fixed stage: -> resolved status: open -> closed ___ Python tracker ___ ___

[issue32500] PySequence_Length() raises TypeError on dict type

2018-07-23 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: New changeset a6fdddb7df00aefad2ec6e362dbf10d4bd8bff32 by Serhiy Storchaka in branch 'master': bpo-32500: Fix error messages for sequence and mapping C API. (GH-7846) https://github.com/python/cpython/commit/a6fdddb7df00aefad2ec6e362dbf10d4bd8bff32

[issue34084] possible free statically allocated string in compiler when easter egg on

2018-07-23 Thread miss-islington
Change by miss-islington : -- pull_requests: +7950 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue34084] possible free statically allocated string in compiler when easter egg on

2018-07-23 Thread miss-islington
Change by miss-islington : -- pull_requests: +7949 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue34084] possible free statically allocated string in compiler when easter egg on

2018-07-23 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: New changeset aba24ff3601ddc86b85e01880a8be596fb799287 by Serhiy Storchaka in branch 'master': bpo-34084: Fix setting an error message for the "Barry as BDFL" easter egg. (GH-8262)

[issue34183] Lib/test/test_contextlib_async.py failed when ran as a script

2018-07-23 Thread miss-islington
Change by miss-islington : -- pull_requests: +7948 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue32752] no information about accessing typing.Generic type arguments

2018-07-23 Thread Guido van Rossum
Change by Guido van Rossum : -- nosy: -gvanrossum ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue34183] Lib/test/test_contextlib_async.py failed when ran as a script

2018-07-23 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: New changeset db8e3a1e4476620b2b5aaf57acfc3ef58a08213b by Serhiy Storchaka in branch 'master': bpo-34183: Fix running Lib/test/test_contextlib_async.py as a script. (GH-8381) https://github.com/python/cpython/commit/db8e3a1e4476620b2b5aaf57acfc3ef58a08213b

[issue34184] Lib/test/test_dataclasses.py failed when ran as a script

2018-07-23 Thread miss-islington
Change by miss-islington : -- pull_requests: +7947 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue34184] Lib/test/test_dataclasses.py failed when ran as a script

2018-07-23 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: New changeset 3fe5cccb08283f5f4817ac432560972a4c0f5290 by Serhiy Storchaka in branch 'master': bpo-34184: Fix running Lib/test/test_dataclasses.py as a script. (GH-8382) https://github.com/python/cpython/commit/3fe5cccb08283f5f4817ac432560972a4c0f5290

Re: Tracking a memory leak in C extension - interpreting the output of PYTHONMALLOCSTATS

2018-07-23 Thread Thomas Jollans
On 23/07/18 20:02, Bartosz Golaszewski wrote: > Hi! Hey! > A user recently reported a memory leak in python bindings (C extension > module) to a C library[1] I wrote. I've been trying to fix it since > but so far without success. Since I'm probably dealing with a space > leak rather than actual

Re: Want to be a rockstar programmer?

2018-07-23 Thread Brian Oney via Python-list
meh, I'm more into 90s and 00s metal rock and punk rock. Oh well, I knew it wasn't meant to be. ;) -- https://mail.python.org/mailman/listinfo/python-list

[issue22323] Rewrite PyUnicode_AsWideChar() and PyUnicode_AsWideCharString(): don't cache the result

2018-07-23 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Oh, I have reimplemented this in issue30863. -- ___ Python tracker ___ ___ Python-bugs-list

[issue30863] Rewrite PyUnicode_AsWideChar() and PyUnicode_AsWideCharString()

2018-07-23 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Victor already wrote similar patch in issue22323. -- ___ Python tracker ___ ___

[issue30863] Rewrite PyUnicode_AsWideChar() and PyUnicode_AsWideCharString()

2018-07-23 Thread Serhiy Storchaka
Change by Serhiy Storchaka : -- Removed message: https://bugs.python.org/msg322251 ___ Python tracker ___ ___ Python-bugs-list

[issue30863] Rewrite PyUnicode_AsWideChar() and PyUnicode_AsWideCharString()

2018-07-23 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Victor already wrote similar patch in issue16254. -- ___ Python tracker ___ ___

[issue15127] Supressing warnings with -w "whether gcc supports ParseTuple"

2018-07-23 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: This code was removed in f6b687fcd4d62e53443e23376dc02c177fecc0d4. -- nosy: +serhiy.storchaka resolution: -> out of date stage: -> resolved status: open -> closed ___ Python tracker

[issue23927] getargs.c skipitem() doesn't skip 'w*'

2018-07-23 Thread Serhiy Storchaka
Change by Serhiy Storchaka : -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker ___

[issue23927] getargs.c skipitem() doesn't skip 'w*'

2018-07-23 Thread Joe Jevnik
Change by Joe Jevnik : -- pull_requests: +7946 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue34189] Add simple tests for new Tk widget options

2018-07-23 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: New changeset fbcb6fae6233efbde1f6bb9fe51e33baec4767b8 by Serhiy Storchaka in branch '2.7': bpo-34189: Remove a file backported by accident. (GH-8419) https://github.com/python/cpython/commit/fbcb6fae6233efbde1f6bb9fe51e33baec4767b8 --

[issue29710] Incorrect representation caveat on bitwise operation docs

2018-07-23 Thread Sanyam Khurana
Sanyam Khurana added the comment: On, yes, I think I missed the first point, earlier. Thank You! I did the changes. -- ___ Python tracker ___

[issue34189] Add simple tests for new Tk widget options

2018-07-23 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Good point Zackery! -- ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue29710] Incorrect representation caveat on bitwise operation docs

2018-07-23 Thread Tim Peters
Tim Peters added the comment: Nick suggested two changes on 2018-07-15 (look above). Mark & I agreed about the first change, so it wasn't mentioned again after that. All the rest has been refining the second change. -- ___ Python tracker

[issue34189] Add simple tests for new Tk widget options

2018-07-23 Thread Serhiy Storchaka
Change by Serhiy Storchaka : -- pull_requests: +7945 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue29710] Incorrect representation caveat on bitwise operation docs

2018-07-23 Thread Sanyam Khurana
Sanyam Khurana added the comment: Hey Tim, > @CuriousLearner, does the PR also include Nick's first suggested change? > Here: """ = Bitwise operations only make sense for integers. The result of bitwise operations is calculated as though carried out in two's complement

[issue13407] tarfile doesn't support multistream bzipped tar files

2018-07-23 Thread Andrés Delfino
Andrés Delfino added the comment: Sorry, you are right. I'll try on 2.7 when I get home, and make a PR if needed. -- ___ Python tracker ___

[issue13407] tarfile doesn't support multistream bzipped tar files

2018-07-23 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: This is a 2.7 only documentation issue. -- ___ Python tracker ___ ___ Python-bugs-list mailing

[issue29710] Incorrect representation caveat on bitwise operation docs

2018-07-23 Thread Tim Peters
Tim Peters added the comment: @CuriousLearner, does the PR also include Nick's first suggested change? Here: """ 1. Replace the opening paragraph of https://docs.python.org/3/library/stdtypes.html#bitwise-operations-on-integer-types (the one I originally quoted when opening this issue)

[issue34191] argparse: Missing subparser error message should be more clear

2018-07-23 Thread paul j3
paul j3 added the comment: Updating you Python3.7 might change the behavior. If I read https://github.com/python/cpython/commits/master/Lib/argparse.py correctly, subparsers are no longer required by default (it reverted back to earlier Py3 behavior). There is a proposed patch for

[issue8525] Display exceptions' subclasses in help()

2018-07-23 Thread Sanyam Khurana
Sanyam Khurana added the comment: Hi, My perception with all the discussion and WIP patch is that we can ideally limit the no. of subclasses shown only for object, and not for any other class. >From that list, the only unhelpful ones with > 4 items, in my opinion, appear >to be `object`,

Want to be a rockstar programmer?

2018-07-23 Thread Larry Martell
https://github.com/dylanbeattie/rockstar -- https://mail.python.org/mailman/listinfo/python-list

Re: PyCharm

2018-07-23 Thread Michael Vilain
I used the pycharm edu version from here: https://www.jetbrains.com/pycharm-edu/download/download-thanks.html?platform=mac input works fine on it. YMMV. > On 20-Jul-2018, at 9:15 PM , no@none.invalid wrote: > > On Fri, 20 Jul 2018 20:56:41 -0700, Michael Vilain > wrote: > >> I'm running

Tracking a memory leak in C extension - interpreting the output of PYTHONMALLOCSTATS

2018-07-23 Thread Bartosz Golaszewski
Hi! A user recently reported a memory leak in python bindings (C extension module) to a C library[1] I wrote. I've been trying to fix it since but so far without success. Since I'm probably dealing with a space leak rather than actual memory leak, valgrind didn't help much even when using malloc

[issue29710] Incorrect representation caveat on bitwise operation docs

2018-07-23 Thread Sanyam Khurana
Sanyam Khurana added the comment: Seems good to me. I've made the changes in the PR. -- ___ Python tracker ___ ___

[issue34189] Add simple tests for new Tk widget options

2018-07-23 Thread Zackery Spytz
Zackery Spytz added the comment: It appears that a file was backported to 2.7 by accident. -- nosy: +ZackerySpytz ___ Python tracker ___

[issue29710] Incorrect representation caveat on bitwise operation docs

2018-07-23 Thread Mark Dickinson
Mark Dickinson added the comment: > 4. Performing these calculations with at least one extra sign extension bit > in a finite two's complement representation (a working bit-width of ``1 + > max(x.bit_length(), y.bit_length()`` or more) is sufficient to get the same > result as if there were

[issue13407] tarfile doesn't support multistream bzipped tar files

2018-07-23 Thread Andrés Delfino
Andrés Delfino added the comment: This is no longer reproducible under 3.7.0. >>> import tarfile >>> tf = tarfile.open("kdelibs-4.7.3.tar.bz2", "r") >>> print(len(tf.getnames())) 9237 Not sure I should be the one closing this. -- nosy: +adelfino

[issue30400] Race condition in shutil.copyfile(): source file replaced file during copy

2018-07-23 Thread Preston Moore
Preston Moore added the comment: Hey everyone, I have updated the pull request to include a version of copyfile() that attempts to address the discussed race condition by open()’ing a file descriptor to the relevant files as early as possible and maintaining it throughout processing. In

Re: Python shuts down when I try to run a module

2018-07-23 Thread Neil Cerutti
On 2018-07-23, Calvin Spealman wrote: > This is an unfortunate property of running command line > programs on Windows. If you run the script directly (like by > double clicking on it?) the console window will close when the > program is done, so you can't see the final output. > > To get around

[issue32752] no information about accessing typing.Generic type arguments

2018-07-23 Thread Jared Deckard
Jared Deckard added the comment: typing_inspect is now filled with python version checks for 3.7. The implementation got significantly more complex when differentiating generics at runtime. 3.6 was undocumented, but the OO API was intuitive: >>> T = typing.Union[int, float] >>> assert

[issue34188] Allow dict choices to "transform" values in argpagse

2018-07-23 Thread paul j3
paul j3 added the comment: The 'choices' mechanism is a simple 'value in choices' test. A dictionary (or other mapping) works because it works with 'in'. 'type' as noted is the means that argparse provides for transforming an input string into some other object (most commonly a number with

[issue34190] x86 Gentoo Refleaks 3.x: test_sys_setprofile leaked [1, 1, 1] references, sum=3

2018-07-23 Thread miss-islington
Change by miss-islington : -- pull_requests: +7944 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue34190] x86 Gentoo Refleaks 3.x: test_sys_setprofile leaked [1, 1, 1] references, sum=3

2018-07-23 Thread STINNER Victor
STINNER Victor added the comment: New changeset 147d95511f59cfdd2d522f9d736f2335457bae20 by Victor Stinner (jdemeyer) in branch 'master': bpo-34190: Fix reference leak in call_function() (GH-8413) https://github.com/python/cpython/commit/147d95511f59cfdd2d522f9d736f2335457bae20 --

[issue34172] multiprocessing.Pool and ThreadPool leak resources after being deleted

2018-07-23 Thread Antoine Pitrou
Antoine Pitrou added the comment: > What other object in the standard lib, leaks resources when deleted in > CPython ? Threads come to mind, for example: >>> import time, threading, weakref >>> t = threading.Thread(target=time.sleep, args=(10,)) >>> t.start() >>> wr = weakref.ref(t) >>>

Python in the news

2018-07-23 Thread Rich Shepard
The lead article in science section and technology section of this week's 'The Economist' is about Python: Enjoy, Rich --

[issue34172] multiprocessing.Pool and ThreadPool leak resources after being deleted

2018-07-23 Thread tzickel
tzickel added the comment: I think I've found the code bug causing the leak: https://github.com/python/cpython/blob/caa331d492acc67d8f4edd16542cebfabbbe1e79/Lib/multiprocessing/pool.py#L180 There is a circular reference between the Pool object, and the self._worker_handler Thread object

[issue34170] Py_Initialize(): computing path configuration must not have side effect (PEP 432)

2018-07-23 Thread STINNER Victor
Change by STINNER Victor : -- pull_requests: +7943 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue34191] argparse: Missing subparser error message should be more clear

2018-07-23 Thread paul j3
paul j3 added the comment: Your code runs fine under 3.6.5. But if I add 'subparsers.required=True', I get your error. It's having problems formatting the name of the subparsers command when issuing the error message. If I add a 'dest' to the add_subparsers I get the expected error

[issue34174] argparse formatter_class issue for RawDescriptionHelpFormatter

2018-07-23 Thread paul j3
paul j3 added the comment: argparse does import 'textwrap', but as '_textwrap', so it could be used with: argparse._textwrap.dedent(...) Importing your own is cleaner. -- nosy: +paul.j3 ___ Python tracker

[issue8525] Display exceptions' subclasses in help()

2018-07-23 Thread Eric Wieser
Eric Wieser added the comment: > I get the following results for builtin objects that have defined subclasses >From that list, the only unhelpful ones with > 4 items, in my opinion, appear >to be `object`, since that just tells you every type that exists, and `tuple`, >because that lists

[issue34046] subparsers -> add_parser doesn't support hyphen char '-'

2018-07-23 Thread paul j3
paul j3 added the comment: Do you understand why this is happening? Subparsers is, in effect, a positional argument with 'choices' - the choices being the parsers (and their aliases). But '-dr' looks like an flagged (optionals) argument. Since you didn't define such an argument, it gets

  1   2   3   >