[issue1635741] Py_Finalize() doesn't clear all Python objects at exit

2020-03-19 Thread hai shi
Change by hai shi : -- pull_requests: +18444 pull_request: https://github.com/python/cpython/pull/19084 ___ Python tracker ___

[issue39939] Add str methods to remove prefixes or suffixes

2020-03-19 Thread Dennis Sweeney
Change by Dennis Sweeney : Added file: https://bugs.python.org/file48989/pep-.rst ___ Python tracker ___ ___ Python-bugs-list mailing

[issue39939] Add str methods to remove prefixes or suffixes

2020-03-19 Thread Dennis Sweeney
Change by Dennis Sweeney : Removed file: https://bugs.python.org/file48983/pep-.rst ___ Python tracker ___ ___ Python-bugs-list mailing

A simple probabilistic model for COVID-19

2020-03-19 Thread pie.denis
Hi! I've created a Jupyter notebook that presents a simple probabilistic model linking diseases (cold, flu, COVID-19) to symptoms (fever, cough): http://mybinder.org/v2/gh/piedenis/lea_mini_tutorials/master?filepath=Lea_CO VID19.ipynb Assuming that this model is accurate (which is probably

[issue40022] 关于列表的基础算法问题

2020-03-19 Thread yepan Li
New submission from yepan Li : English is very poor so I use Chinese, 这是一个偶然的发现 lis1 = [1,2,3,4,5,6,7,8,9,10]#定义一个列表 lislen = len(lis1)#获得列表长度 此时lislen(列表1)的值为10 lis2 = []*lislen#定义一个新列表长度和第一个列表不一样但是没有元素 print(lis1)#输出测试一下第一个列表正常 for i in lis1:#用i循环遍历数组1

[issue40021] Throwing an Exception results in stack overflow

2020-03-19 Thread Benjamin Peterson
Change by Benjamin Peterson : -- resolution: -> duplicate stage: -> resolved status: open -> closed superseder: -> Interpreter aborts when chaining an infinite number of exceptions versions: -Python 3.8 ___ Python tracker

[issue40021] Throwing an Exception results in stack overflow

2020-03-19 Thread ThePokestarFan
ThePokestarFan added the comment: I tested the program against my 3.8 installation and got the same error. -- versions: +Python 3.8 ___ Python tracker ___

[issue40021] Throwing an Exception results in stack overflow

2020-03-19 Thread ThePokestarFan
Change by ThePokestarFan : Added file: https://bugs.python.org/file48987/program.py ___ Python tracker ___ ___ Python-bugs-list mailing

[issue40021] Throwing an Exception results in stack overflow

2020-03-19 Thread ThePokestarFan
Change by ThePokestarFan : Added file: https://bugs.python.org/file48986/python2.txt ___ Python tracker ___ ___ Python-bugs-list mailing

[issue40021] Throwing an Exception results in stack overflow

2020-03-19 Thread ThePokestarFan
Change by ThePokestarFan : Added file: https://bugs.python.org/file48985/interpter.txt ___ Python tracker ___ ___ Python-bugs-list mailing

[issue40021] Throwing an Exception results in stack overflow

2020-03-19 Thread ThePokestarFan
New submission from ThePokestarFan : If I set up a simple recursion exception function, that calls itself every time an error is raised, Python throws a SIGABRT and crashes due to a "Stack Overflow". def x(): try: raise Exception() except Exception: x() Oddly

[issue40020] growable_comment_array_add leaks, causes crash

2020-03-19 Thread Alexander Riccio
Change by Alexander Riccio : -- keywords: +patch pull_requests: +18442 stage: -> patch review pull_request: https://github.com/python/cpython/pull/19083 ___ Python tracker

[issue40020] growable_comment_array_add leaks, causes crash

2020-03-19 Thread Alexander Riccio
Alexander Riccio added the comment: Sidenote: visual studio was misleading and made this look like a use-after-free for a little while, which was interesting. -- nosy: +pablogsal ___ Python tracker

Re: queue versus list

2020-03-19 Thread Cameron Simpson
On 20Mar2020 00:37, duncan smith wrote: On 19/03/2020 20:40, MRAB wrote: On 2020-03-19 20:08, duncan smith wrote:    I have generator code along the following lines, Q = queue.Queue() Q.put(x) while not Q.empty(): x = Q.get() if : yield x else:    Q.put() If

[issue40020] growable_comment_array_add leaks, causes crash

2020-03-19 Thread Alexander Riccio
New submission from Alexander Riccio : growable_comment_array_add in parsetok.c incorrectly uses realloc, which leaks the array when allocation fails, and then causes a null pointer deref crash later when the array is freed in growable_comment_array_deallocate (the array pointer is

Re: queue versus list

2020-03-19 Thread duncan smith
On 19/03/2020 20:40, MRAB wrote: > On 2020-03-19 20:08, duncan smith wrote: >> Hello, >>    I have generator code along the following lines, >> >> >> Q = queue.Queue() >> Q.put(x) >> while not Q.empty(): >> x = Q.get() >> if : >> yield x >> else: >>    Q.put() >> >>

[issue39939] Add str methods to remove prefixes or suffixes

2020-03-19 Thread Dennis Sweeney
Dennis Sweeney added the comment: Here is a draft PEP -- I believe it needs a Core Developer sponsor now? -- Added file: https://bugs.python.org/file48983/pep-.rst ___ Python tracker

[issue27307] string.Formatter does not support key/attribute access on unnumbered fields

2020-03-19 Thread Maxwell Bernstein
Maxwell Bernstein added the comment: Okay, well it doesn't provide the desired behavior of raising the error when switching back and forth between manual and auto numbering, so I am looking into that. -- ___ Python tracker

[issue39953] Let's update ssl error codes

2020-03-19 Thread Benjamin Peterson
Change by Benjamin Peterson : -- keywords: +patch nosy: +benjamin.peterson nosy_count: 6.0 -> 7.0 pull_requests: +18441 stage: -> patch review pull_request: https://github.com/python/cpython/pull/19082 ___ Python tracker

[issue38350] ./configure --with-pydebug should use -O0 rather than -Og

2020-03-19 Thread STINNER Victor
STINNER Victor added the comment: See also bpo-40019: "test_gdb should better detect when Python is optimized". -- ___ Python tracker ___

[issue40019] test_gdb should better detect when Python is optimized

2020-03-19 Thread STINNER Victor
Change by STINNER Victor : -- keywords: +patch pull_requests: +18440 stage: -> patch review pull_request: https://github.com/python/cpython/pull/19081 ___ Python tracker ___

[issue40019] test_gdb should better detect when Python is optimized

2020-03-19 Thread STINNER Victor
New submission from STINNER Victor : On my PR 19077 which changes Python/ceval.c, test_gdb fails on Travis CI with Python compiled with clang -Og. The -Og optimization level is a compromise between performance and the ability to debug Python. The problem is that gdb fails to retrieve some

[issue40018] test_ssl fails with OpenSSL 1.1.1e

2020-03-19 Thread Benjamin Peterson
Benjamin Peterson added the comment: I think this is caused by their EOF change: https://github.com/openssl/openssl/issues/10880 read() now sometimes gives you the infamous OSError errno 0 rather than b'' at the end of the stream. -- ___ Python

Re: How does the super type present itself and do lookups?

2020-03-19 Thread Greg Ewing
On 11/03/20 7:02 am, Adam Preble wrote: Is this foo attribute being looked up in an override of __getattr__, __getattribute__, or is it a reserved slot that's internally doing this? That's what I'm trying to figure out. Looking at the source in Objects/typeobject.c, it uses the tp_getattro

[issue22699] Module source files not found when cross-compiling

2020-03-19 Thread Ned Deily
Change by Ned Deily : -- nosy: +ned.deily ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue40018] test_ssl fails with OpenSSL 1.1.1e

2020-03-19 Thread Benjamin Peterson
New submission from Benjamin Peterson : == ERROR: test_ciphers (test.test_ssl.SimpleBackgroundTests) -- Traceback (most recent call last): File

[issue40017] Please support CLOCK_TAI in the time module.

2020-03-19 Thread STINNER Victor
Change by STINNER Victor : -- nosy: +vstinner ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

Re: queue versus list

2020-03-19 Thread MRAB
On 2020-03-19 20:08, duncan smith wrote: Hello, I have generator code along the following lines, Q = queue.Queue() Q.put(x) while not Q.empty(): x = Q.get() if : yield x else: Q.put() If I change it to, Q = [] Q.append(x) for x in Q: if :

[issue40017] Please support CLOCK_TAI in the time module.

2020-03-19 Thread Benjamin Peterson
Benjamin Peterson added the comment: I think we could certainly take a patch to expose that constant if libc/kernel headers expose it. -- nosy: +benjamin.peterson ___ Python tracker

[issue25878] CPython on Windows builds with /W3, not /W4

2020-03-19 Thread Steve Dower
Steve Dower added the comment: Thanks for all that work! We definitely don't want a noisy build to be merged, but if you submit a PR with only your most confident suppressions then it'll be easier for us to look at the others and see which are scary/not-scary. --

[issue22699] Module source files not found when cross-compiling

2020-03-19 Thread Steve Dower
Steve Dower added the comment: So ultimately this is a major sysconfig design flaw, and it likely requires a rewrite. The mix of information sources between _sysconfigdata (even when overriding the name and PYTHONPATH) and the Makefile, and the order in which you can rely them to be loaded

queue versus list

2020-03-19 Thread duncan smith
Hello, I have generator code along the following lines, Q = queue.Queue() Q.put(x) while not Q.empty(): x = Q.get() if : yield x else: Q.put() If I change it to, Q = [] Q.append(x) for x in Q: if : yield x else: Q.append() then it runs

[issue25878] CPython on Windows builds with /W3, not /W4

2020-03-19 Thread Alexander Riccio
Alexander Riccio added the comment: Ok, so I finally have some proper time to work on this. How would people (who are higher up in python than me, obviously) feel about suppressing most of the warnings via a user macro in Visual Studio? I've found that it's quite easy to add a macro to the

[issue40017] Please support CLOCK_TAI in the time module.

2020-03-19 Thread Russell Owen
New submission from Russell Owen : It is becoming common (at least in astronomy) to want to use TAI as a time standard because it is a uniform time with no leap seconds, and differs from UTC (standard computer clock time) by an integer number of seconds that occasionally changes. Linux

[issue39969] Remove Param expression context from AST

2020-03-19 Thread Batuhan Taskaya
Batuhan Taskaya added the comment: > Batuhan: You maybe want to propose a fix there. It shouldn't be hard to fix > the issue. Serhiy has an open PR about adding some dummy classes that will represent recent deletions like Suite, Param and AugStore/Load.

[issue40016] Clarify flag case in `re` module

2020-03-19 Thread Ram Rachum
Ram Rachum added the comment: I'm gonna look past the rudeness, and I'll just say that if I was tripped up by this, after 11 years of working with Python and the re module, then people in a beginner or intermediate level could be tripped up by this as well. Here's another, simpler

[issue27307] string.Formatter does not support key/attribute access on unnumbered fields

2020-03-19 Thread Maxwell Bernstein
Maxwell Bernstein added the comment: Looks like the patch solves my problem, so I am going to update my PR sometime today. -- ___ Python tracker ___

[issue40010] Inefficient sigal handling in multithreaded applications

2020-03-19 Thread STINNER Victor
STINNER Victor added the comment: New changeset a36adfa6bbf5e612a4d4639124502135690899b8 by Victor Stinner in branch 'master': bpo-39877: 4th take_gil() fix for daemon threads (GH-19080) https://github.com/python/cpython/commit/a36adfa6bbf5e612a4d4639124502135690899b8 --

[issue39877] Daemon thread is crashing in PyEval_RestoreThread() while the main thread is exiting the process

2020-03-19 Thread STINNER Victor
STINNER Victor added the comment: New changeset a36adfa6bbf5e612a4d4639124502135690899b8 by Victor Stinner in branch 'master': bpo-39877: 4th take_gil() fix for daemon threads (GH-19080) https://github.com/python/cpython/commit/a36adfa6bbf5e612a4d4639124502135690899b8 --

[issue39321] AMD64 FreeBSD Non-Debug 3.x: main regrtest process killed by SIGKILL (Signal 9)

2020-03-19 Thread STINNER Victor
STINNER Victor added the comment: The bug still occurs time to time. AMD64 FreeBSD Non-Debug 3.x: https://buildbot.python.org/all/#/builders/214/builds/475 -- ___ Python tracker

[issue39994] Redundant code in pprint module.

2020-03-19 Thread Palak Kumar Jha
Change by Palak Kumar Jha : -- nosy: +fdrake versions: -Python 3.7 ___ Python tracker ___ ___ Python-bugs-list mailing list

[issue33327] Add a method to move messages to IMAPlib

2020-03-19 Thread STINNER Victor
Change by STINNER Victor : -- nosy: -vstinner ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue40000] Improve AST validation for Constant nodes

2020-03-19 Thread STINNER Victor
STINNER Victor added the comment: > _PyType_Name(Py_TYPE(value))) Why truncating the type name in the error message? The qualified name (don't call _PyType_Name()) should provide more information, no? -- ___ Python tracker

[issue40016] Clarify flag case in `re` module

2020-03-19 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: I do not see any issue except that you was careless when read the documentation. -- ___ Python tracker ___

[issue39969] Remove Param expression context from AST

2020-03-19 Thread STINNER Victor
STINNER Victor added the comment: FYI this change broke the chameleon project: https://github.com/malthe/chameleon/issues/303 Batuhan: You maybe want to propose a fix there. It shouldn't be hard to fix the issue. -- nosy: +vstinner ___ Python

[issue27307] string.Formatter does not support key/attribute access on unnumbered fields

2020-03-19 Thread Maxwell Bernstein
Maxwell Bernstein added the comment: I'll take a look at the patch and see if this solves my problem. If it does, I'll update my PR with tests. -- ___ Python tracker ___

[issue40016] Clarify flag case in `re` module

2020-03-19 Thread Ram Rachum
Ram Rachum added the comment: Oops, my mistake. Any other idea how to solve this discrepancy? -- ___ Python tracker ___ ___

[issue39877] Daemon thread is crashing in PyEval_RestoreThread() while the main thread is exiting the process

2020-03-19 Thread STINNER Victor
Change by STINNER Victor : -- pull_requests: +18437 pull_request: https://github.com/python/cpython/pull/19080 ___ Python tracker ___

Re: PEP Idea: Multi-get for lists/tuples and dictionaries (inspired in NumPy)

2020-03-19 Thread Marco Sulla
On Thu, 19 Mar 2020 at 16:46, Peter J. Holzer wrote: > This is similar to algebraic expressions: Have you ever tried to read a > mathematical paper from before the time the current notation (which we > Long, convoluted > sentences instead of what can now be written as a short formula. ...yes,

[issue40010] Inefficient sigal handling in multithreaded applications

2020-03-19 Thread STINNER Victor
Change by STINNER Victor : -- pull_requests: +18438 pull_request: https://github.com/python/cpython/pull/19080 ___ Python tracker ___

[issue40016] Clarify flag case in `re` module

2020-03-19 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: They are. -- ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue40016] Clarify flag case in `re` module

2020-03-19 Thread Ram Rachum
Ram Rachum added the comment: Well, these aren't the textbook case of a constant, since they're enums, and not defined in the global namespace. -- ___ Python tracker ___

[issue38237] Expose meaningful keyword arguments for pow()

2020-03-19 Thread miss-islington
Change by miss-islington : -- pull_requests: +18436 pull_request: https://github.com/python/cpython/pull/19079 ___ Python tracker ___

[issue40016] Clarify flag case in `re` module

2020-03-19 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: It is very inconvenient to use single-letter lowercase names for constants. It contradicts PEP 8: https://www.python.org/dev/peps/pep-0008/#constants -- nosy: +serhiy.storchaka ___ Python tracker

[issue40016] Clarify flag case in `re` module

2020-03-19 Thread Ram Rachum
Ram Rachum added the comment: As you can see I left the old uppercase enums defined, to avoid breaking backward compatibility. We could make them trigger a DeprecationWarning. -- ___ Python tracker

[issue40016] Clarify flag case in `re` module

2020-03-19 Thread Ram Rachum
Change by Ram Rachum : -- keywords: +patch pull_requests: +18434 stage: -> patch review pull_request: https://github.com/python/cpython/pull/19078 ___ Python tracker ___

[issue40016] Clarify flag case in `re` module

2020-03-19 Thread Ram Rachum
New submission from Ram Rachum : Today I was tripped up by an inconsistency in the `re` docstring. I wanted to use DOTALL as a flag inside my regex, rather than as an argument to the `compile` function. Here are two lines from the docstring: (?aiLmsux) Set the A, I, L, M, S, U, or X flag

[issue40010] Inefficient sigal handling in multithreaded applications

2020-03-19 Thread STINNER Victor
Change by STINNER Victor : -- pull_requests: +18433 stage: -> patch review pull_request: https://github.com/python/cpython/pull/19077 ___ Python tracker ___

[issue39824] Multi-phase extension module (PEP 489): don't call m_traverse, m_clear nor m_free before the module state is allocated

2020-03-19 Thread miss-islington
miss-islington added the comment: New changeset 13397ee47d23fda2e8d4bef40c1df986457673d1 by Hai Shi in branch 'master': bpo-39824: Convert PyModule_GetState() to get_module_state() (GH-19076) https://github.com/python/cpython/commit/13397ee47d23fda2e8d4bef40c1df986457673d1 -- nosy:

[issue40014] os.getgrouplist() can fail on macOS

2020-03-19 Thread Ned Deily
Change by Ned Deily : -- title: os.getgrouplist() fails on macOS of GH Actions (Azure) -> os.getgrouplist() can fail on macOS ___ Python tracker ___

[issue40014] os.getgrouplist() fails on macOS of GH Actions (Azure)

2020-03-19 Thread Ned Deily
Ned Deily added the comment: This error has to do with the number of groups a particular user is associated with. We’ve squashed similar bugs in the past but it looks like something has changed again in recent releases of macOS. It’s not Azure specific. --

[issue40015] logging.Logger.disabled field is redundant

2020-03-19 Thread Venkatesh-Prasad Ranganath
Venkatesh-Prasad Ranganath added the comment: `logging.Logger.disabled` field is used in logging.config module to disable loggers during configuration. Since the field is not redundant, the issue is invalid and, hence, should be closed. -- resolution: -> not a bug stage: ->

[issue27307] string.Formatter does not support key/attribute access on unnumbered fields

2020-03-19 Thread Eric V. Smith
Eric V. Smith added the comment: It would be good if someone could convert this to a pull request and beef up the tests. -- ___ Python tracker ___

[issue39824] Multi-phase extension module (PEP 489): don't call m_traverse, m_clear nor m_free before the module state is allocated

2020-03-19 Thread hai shi
Change by hai shi : -- pull_requests: +18432 pull_request: https://github.com/python/cpython/pull/19076 ___ Python tracker ___ ___

Re: PEP Idea: Multi-get for lists/tuples and dictionaries (inspired in NumPy)

2020-03-19 Thread MRAB
On 2020-03-19 15:17, Musbur wrote: Hello, either it's me or everybody else who's missing the point. I understand the OP's proposal like this: dict[set] == {k: dict[k] for k in set} list[iterable] == [list[i] for i in iterable] Am I right? "Iterable" is too broad because it includes tuples

[issue40015] logging.Logger.disabled field is redundant

2020-03-19 Thread Venkatesh-Prasad Ranganath
New submission from Venkatesh-Prasad Ranganath : `logging.Logger.disabled` field is assigned `False` while initializing `logging.Logger` instance and never updated. However, this field is also involved in two checks:

[issue40010] Inefficient sigal handling in multithreaded applications

2020-03-19 Thread STINNER Victor
STINNER Victor added the comment: New changeset 5a3a71dddbe80edc75a3a74ce3b7978cf8635901 by Victor Stinner in branch 'master': bpo-40010: Optimize signal handling in multithreaded applications (GH-19067) https://github.com/python/cpython/commit/5a3a71dddbe80edc75a3a74ce3b7978cf8635901

[issue40014] os.getgrouplist() fails on macOS of GH Actions (Azure)

2020-03-19 Thread STINNER Victor
STINNER Victor added the comment: These errors are really strange. Steve Dower: are you aware of anything recent change on the macOS job of Azure Pipelines / GH Actions. pythoninfo: --- os.uname: posix.uname_result(sysname='Darwin', nodename='Mac-1422.local', release='19.3.0',

ANN: Leo 6.2 b1 released

2020-03-19 Thread Edward K. Ream
Leo 6.2-b1, http://leoeditor.com, is now available on [GitHub]( https://github.com/leo-editor/leo-editor). Leo is an [IDE, outliner and PIM](http://leoeditor.com/preface.html). **The highlights of Leo 6.2** - Added the fstringify-files and diff-fstringify-files commands. - Improved the

Re: PEP Idea: Multi-get for lists/tuples and dictionaries (inspired in NumPy)

2020-03-19 Thread Rhodri James
On 19/03/2020 14:47, Peter J. Holzer wrote: On 2020-03-19 14:24:35 +, Rhodri James wrote: On 19/03/2020 13:00, Peter J. Holzer wrote: It's more compact, especially, if "d" isn't a one-character variable, but an expression: fname, lname =

[issue1635741] Py_Finalize() doesn't clear all Python objects at exit

2020-03-19 Thread STINNER Victor
STINNER Victor added the comment: New changeset 77248a28896d39cae0a7e084965b9ffc2624b7f4 by Dong-hee Na in branch 'master': bpo-1635741: Port _collections module to multiphase initialization (GH-19074) https://github.com/python/cpython/commit/77248a28896d39cae0a7e084965b9ffc2624b7f4

[issue40014] os.getgrouplist can raise OSError during the Display build info

2020-03-19 Thread Dong-hee Na
Change by Dong-hee Na : -- keywords: +patch pull_requests: +18431 stage: -> patch review pull_request: https://github.com/python/cpython/pull/19075 ___ Python tracker ___

[issue40014] os.getgrouplist can raise OSError during the Display build info

2020-03-19 Thread Dong-hee Na
Dong-hee Na added the comment: or adding might be great just like getpwuid -- ___ Python tracker ___ ___ Python-bugs-list mailing

[issue40014] os.getgrouplist can raise OSError during the Display build info

2020-03-19 Thread Dong-hee Na
New submission from Dong-hee Na : example: https://github.com/python/cpython/pull/19073/checks?check_run_id=519539592 I suggest to not to add information for os.getgrouplist if the OSError is raised. -- components: Tests messages: 364607 nosy: corona10, vstinner priority: normal

Re: PEP Idea: Multi-get for lists/tuples and dictionaries (inspired in NumPy)

2020-03-19 Thread Chris Angelico
On Fri, Mar 20, 2020 at 2:46 AM Peter J. Holzer wrote: > > A good language has a small core and extensibility via > > libraries. > > This would actually be a feature of the (standard) library. I think the line kinda blurs here. This would be a feature of a core data type, and in CPython, it

RE: PEP Idea: Multi-get for lists/tuples and dictionaries (inspired in NumPy)

2020-03-19 Thread David Raymond
For dictionaries it'd even be more useful: d = { 'first_name': 'Frances', 'last_name': 'Allen', 'email': 'fal...@ibm.com' } fname, lname = d[['first_name', 'last_name']] Why not do this? import operator first_last = operator.itemgetter("first_name",

Re: PEP Idea: Multi-get for lists/tuples and dictionaries (inspired in NumPy)

2020-03-19 Thread Chris Angelico
On Fri, Mar 20, 2020 at 2:37 AM Terry Reedy wrote: > > On 3/18/2020 10:28 PM, Santiago Basulto wrote: > > > For dictionaries it'd even be more useful: > > d = { > > 'first_name': 'Frances', > > 'last_name': 'Allen', > > 'email': 'fal...@ibm.com' > > } > >

Re: PEP Idea: Multi-get for lists/tuples and dictionaries (inspired in NumPy)

2020-03-19 Thread Peter J. Holzer
On 2020-03-19 08:05:18 -0700, Dan Stromberg wrote: > On Thu, Mar 19, 2020 at 7:47 AM Peter J. Holzer wrote: > > On 2020-03-19 14:24:35 +, Rhodri James wrote: > > > On 19/03/2020 13:00, Peter J. Holzer wrote: > > > > It's more compact, especially, if "d" isn't a one-character variable, > > > >

Re: PEP Idea: Multi-get for lists/tuples and dictionaries (inspired in NumPy)

2020-03-19 Thread Ethan Furman
On 03/19/2020 02:09 AM, Terry Reedy wrote: On 3/18/2020 10:28 PM, Santiago Basulto wrote: For dictionaries it'd even be more useful: d = { 'first_name': 'Frances', 'last_name': 'Allen', 'email': 'fal...@ibm.com' } fname, lname = d[['first_name',

Re: PEP Idea: Multi-get for lists/tuples and dictionaries (inspired in NumPy)

2020-03-19 Thread Terry Reedy
On 3/18/2020 10:28 PM, Santiago Basulto wrote: For dictionaries it'd even be more useful: d = { 'first_name': 'Frances', 'last_name': 'Allen', 'email': 'fal...@ibm.com' } fname, lname = d[['first_name', 'last_name']] Insert ordered dicts make this

Re: PEP Idea: Multi-get for lists/tuples and dictionaries (inspired in NumPy)

2020-03-19 Thread Musbur
Hello, either it's me or everybody else who's missing the point. I understand the OP's proposal like this: dict[set] == {k: dict[k] for k in set} list[iterable] == [list[i] for i in iterable] Am I right? -- https://mail.python.org/mailman/listinfo/python-list

Re: PEP Idea: Multi-get for lists/tuples and dictionaries (inspired in NumPy)

2020-03-19 Thread Pieter van Oostrum
Santiago Basulto writes: > Hello community. I have an idea to share with the list to see what you all > think about it. > > I happen to use both Python for Data Science (with our regular friends > NumPy and Pandas) as well as for scripting and backend development. Every > time I'm working in

[issue27307] string.Formatter does not support key/attribute access on unnumbered fields

2020-03-19 Thread Eric V. Smith
Change by Eric V. Smith : -- nosy: +tekknolagi ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue27307] string.Formatter does not support key/attribute access on unnumbered fields

2020-03-19 Thread Eric V. Smith
Change by Eric V. Smith : -- versions: +Python 3.7, Python 3.8, Python 3.9 -Python 3.5, Python 3.6 ___ Python tracker ___ ___

[issue39985] str.format and string.Formatter subscript behaviors diverge

2020-03-19 Thread Eric V. Smith
Eric V. Smith added the comment: In fact, this is a duplicate of issue27307, so I'm going to close this. -- resolution: -> duplicate stage: patch review -> resolved status: open -> closed superseder: -> string.Formatter does not support key/attribute access on unnumbered fields

[issue1635741] Py_Finalize() doesn't clear all Python objects at exit

2020-03-19 Thread Dong-hee Na
Change by Dong-hee Na : -- pull_requests: +18430 pull_request: https://github.com/python/cpython/pull/19074 ___ Python tracker ___

[issue39107] Upgrade tcl/tk to 8.6.10 (Windows and maxOS)

2020-03-19 Thread szb512
szb512 added the comment: I'll update my PR to include some changes for windows. -- nosy: +alittleman512 ___ Python tracker ___

Re: PEP Idea: Multi-get for lists/tuples and dictionaries (inspired in NumPy)

2020-03-19 Thread Dan Stromberg
On Thu, Mar 19, 2020 at 7:47 AM Peter J. Holzer wrote: > On 2020-03-19 14:24:35 +, Rhodri James wrote: > > On 19/03/2020 13:00, Peter J. Holzer wrote: > > > It's more compact, especially, if "d" isn't a one-character variable, > > > but an expression: > > > > > > fname, lname = >

[issue38377] test_asyncio.test_events.GetEventLoopTestsMixin.test_get_event_loop_new_process mixin breaks in the Unix environment without working /dev/shm

2020-03-19 Thread Matej Cepl
Change by Matej Cepl : -- pull_requests: +18428 pull_request: https://github.com/python/cpython/pull/19073 ___ Python tracker ___

Re: Why is the program not printing three lines?

2020-03-19 Thread Souvik Dutta
Ooo thanks I understood. On Thu, 19 Mar, 2020, 8:10 pm Pieter van Oostrum, wrote: > Souvik Dutta writes: > > > I should have been more clear > > class first(): > > print("from first") > > def second(): > > print("from second") > > first() > > > > When I run the above code the

Re: PEP Idea: Multi-get for lists/tuples and dictionaries (inspired in NumPy)

2020-03-19 Thread Peter J. Holzer
On 2020-03-19 14:24:35 +, Rhodri James wrote: > On 19/03/2020 13:00, Peter J. Holzer wrote: > > It's more compact, especially, if "d" isn't a one-character variable, > > but an expression: > > > > fname, lname = db[people].employee.object.get(pk=1234)[['first_name', > > 'last_name']] >

[issue33327] Add a method to move messages to IMAPlib

2020-03-19 Thread Matej Cepl
Change by Matej Cepl : -- keywords: +patch pull_requests: +18427 stage: test needed -> patch review pull_request: https://github.com/python/cpython/pull/19072 ___ Python tracker

Re: Why is the program not printing three lines?

2020-03-19 Thread Pieter van Oostrum
Souvik Dutta writes: > I should have been more clear > class first(): > print("from first") > def second(): > print("from second") > first() > > When I run the above code the output is > "from first" And where do you think this comes from? Are you thinking this comes from the

[issue1635741] Py_Finalize() doesn't clear all Python objects at exit

2020-03-19 Thread Dong-hee Na
Change by Dong-hee Na : -- pull_requests: +18426 pull_request: https://github.com/python/cpython/pull/19071 ___ Python tracker ___

[issue39985] str.format and string.Formatter subscript behaviors diverge

2020-03-19 Thread Eric V. Smith
Eric V. Smith added the comment: Can you see if the patch in issue27307 solves your problem? -- ___ Python tracker ___ ___

Re: Why is the program not printing three lines?

2020-03-19 Thread Rhodri James
On 19/03/2020 13:58, Souvik Dutta wrote: I should have been more clear class first(): print("from first") def second(): print("from second") first() When I run the above code the output is "from first" (2ND CODE) class first(): print("from first") def second():

Re: Why is the program not printing three lines?

2020-03-19 Thread Chris Angelico
On Fri, Mar 20, 2020 at 1:04 AM Souvik Dutta wrote: > > I should have been more clear > class first(): > print("from first") > def second(): > print("from second") > first() > > When I run the above code the output is > "from first" > (2ND CODE) > Try this *without* the call to

Re: PEP Idea: Multi-get for lists/tuples and dictionaries (inspired in NumPy)

2020-03-19 Thread Rhodri James
On 19/03/2020 13:00, Peter J. Holzer wrote: On 2020-03-19 18:22:34 +1300, DL Neil via Python-list wrote: On 19/03/20 3:28 PM, Santiago Basulto wrote: myself missing A LOT features from NumPy, like fancy indexing or boolean arrays. So, has it ever been considered to bake into Python's builtin

Re: Why is the program not printing three lines?

2020-03-19 Thread Souvik Dutta
I should have been more clear class first(): print("from first") def second(): print("from second") first() When I run the above code the output is "from first" (2ND CODE) class first(): print("from first") def second(): print("from second") first.second() When I

Re: Reduce waiting queue at supermarket from Corona with Python-Webapp

2020-03-19 Thread Orges Leka
If someone from Germany wants to help creatively against the Virus in a Hackathon this Weekend: https://www.bundesregierung.de/breg-de/themen/coronavirus/wir-vs-virus-1731968 Am Mo., 16. März 2020 um 21:16 Uhr schrieb Barry Scott < ba...@barrys-emacs.org>: > > > > On 16 Mar 2020, at 17:38, Orges

  1   2   >