Re: A question related to the PYTHONPATH

2018-03-27 Thread oyono
Le mardi 27 mars 2018 07:42:57 UTC+2, dieter a écrit : > oyono writes: > > ... > > I was thinking, maybe it could have been done this way to enforce not > > running module files that are supposed to be bundled into packages as > > "independant" python scripts...Therefore,

[issue33152] clean code

2018-03-27 Thread Windson Yang
New submission from Windson Yang : https://github.com/python/cpython/blob/master/Lib/timeit.py#L202 use a list comprehension instead -- components: Distutils messages: 314504 nosy: Windson Yang, dstufft, eric.araujo priority: normal severity: normal status: open

Re: please test the new PyPI (now in beta)

2018-03-27 Thread Steven D'Aprano
On Mon, 26 Mar 2018 18:16:26 -0400, Sumana Harihareswara wrote: > The new Python Package Index at https://pypi.org is now in beta. > > This means the site is robust, but we anticipate needing more user > testing and changes before it is "production-ready" and can fully > replace

Re: Entering a very large number

2018-03-27 Thread Steven D'Aprano
On Mon, 26 Mar 2018 23:49:07 -0400, Richard Damon wrote: > The bigger issue is that these sort of micro-measurements aren't > actually that good at measuring real quantitative performance costs. > They can often give qualitative indications, but the way modern > computers work, processing

[issue33124] Lazy execution of module bytecode

2018-03-27 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Function definitions usually are cheap, as well as global constants definitions (unless they use complex comprehensions or call heavy functions for initialization). Creating a class is an order or more slower than creating a

Re: Ruby parens-free function calls [was Re: Accessing parent objects]

2018-03-27 Thread Gregory Ewing
Ned Batchelder wrote: "Ranting Rick" isn't trying to enlighten, educate, or learn. He's trying to rile people up, and he is good at it. I don't think he's even trying, it just come naturally to him. Rick rants the way wind blows and water wets. -- Greg --

Re: Ruby parens-free function calls [was Re: Accessing parent objects]

2018-03-27 Thread Gregory Ewing
Chris Angelico wrote: Question: How do you get a reference to a Ruby function? Or are they not first-class objects? They're not first-class. So, you can't. -- Greg -- https://mail.python.org/mailman/listinfo/python-list

[issue33150] Signature error for methods of class configparser.Interpolation

2018-03-27 Thread Serhiy Storchaka
Change by Serhiy Storchaka : -- nosy: +lukasz.langa ___ Python tracker ___ ___

Re: please test the new PyPI (now in beta)

2018-03-27 Thread Paul Moore
On 27 March 2018 at 09:35, Steven D'Aprano wrote: > On Mon, 26 Mar 2018 18:16:26 -0400, Sumana Harihareswara wrote: > >> The new Python Package Index at https://pypi.org is now in beta. >> >> This means the site is robust, but we anticipate needing more user

[issue33152] clean code

2018-03-27 Thread Roundup Robot
Change by Roundup Robot : -- keywords: +patch pull_requests: +5994 stage: -> patch review ___ Python tracker ___

Re: Ruby parens-free function calls [was Re: Accessing parent objects]

2018-03-27 Thread Steven D'Aprano
On Mon, 26 Mar 2018 11:37:35 -0700, Rick Johnson wrote: > On Monday, March 26, 2018 at 5:46:03 AM UTC-5, Steven D'Aprano wrote: >> Rick, you're supposedly familiar with Ruby. And yet, you didn't notice >> that your supposed "fix" didn't touch any executable code, all it did >> was modify the

[issue31550] Inconsistent error message for TypeError with subscripting

2018-03-27 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: If the reason of this change was making the error message more consistent with other error messages in classic classes (at the cost of larger dereference with Python 3), it LGTM. --

[issue33014] Clarify str.isidentifier docstring; fix keyword.iskeyword docstring

2018-03-27 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: I concur with David about the docstring. But I think that no changes are needed in the module documentation. David's wording would contain two links (for iskeyword() and for keyword), and many links distract the attention. We

Re: Ruby parens-free function calls [was Re: Accessing parent objects]

2018-03-27 Thread Chris Angelico
On Tue, Mar 27, 2018 at 5:54 PM, Gregory Ewing wrote: > Chris Angelico wrote: >> >> Question: How do you get a reference to a Ruby function? Or are they >> not first-class objects? > > > They're not first-class. So, you can't. > Ahh, that explains it. Great. So how

Re: Ruby parens-free function calls [was Re: Accessing parent objects]

2018-03-27 Thread Stephen Hansen
On Mon, Mar 26, 2018, at 2:19 PM, Rick Johnson wrote: >Sure, the behavior that Steven > uncovered is odd, but it could be that Maz harbors a strong > disliking for undisciplined pupils, and thus, he designed > and placed this little trap in the hopes the pain it induced > might encourage the

[issue33144] random._randbelow optimization

2018-03-27 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: I think this is excellent application of __init_subclass__. It is common to patch an instance method in __init__, but this can create a reference loop if patch it by other instance method. In this case the choice doesn't depend

[issue33146] contextlib.suppress should capture exception for inspection and filter on substrings

2018-03-27 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: I'm not sure that contextlib.suppress() should be added at first place. try: os.remove(somefile) except FileNotFoundError: pass is a tiny bit longer, but is more explicit, doesn't depend on the other

To super or not to super (Re: Accessing parent objects)

2018-03-27 Thread Gregory Ewing
The idea that super() is *always* the right way to call inherited methods in a multiple inheritance environment seems to have been raised by some people to the level of religous dogma. I don't buy it. In order for it to work, the following two conditions must hold: 1) All the methods involved

Re: please test the new PyPI (now in beta)

2018-03-27 Thread Paul Moore
On 27 March 2018 at 10:48, Paul Moore wrote: > Same is true of your comment about the site design, > although I suspect it's a bit late for that to be changed in the > immediate future - the site design has been basically unchanged since > very early in the redesign.

Re: please test the new PyPI (now in beta)

2018-03-27 Thread Chris Angelico
On Tue, Mar 27, 2018 at 9:49 PM, Steven D'Aprano wrote: > As an extra bonus, even when searching is not reliant on Javascript, > mangling the text in the search box often is, so unless I'm extra > careful, whenever I want to search for (say) "aardvarks", I

[issue33154] subprocess.Popen ResourceWarning should have activation-deactivation flags

2018-03-27 Thread Arno-Can Uestuensoez
New submission from Arno-Can Uestuensoez : The subprocess call *subprocess.Popen* in Python3.6 was added a number of resource warnings, including subprocess run-state and open files. This is a very good facility for debugging, but causes a lot of trouble for programs

Re: please test the new PyPI (now in beta)

2018-03-27 Thread Steven D'Aprano
On Tue, 27 Mar 2018 22:25:44 +1100, Chris Angelico wrote: > On Tue, Mar 27, 2018 at 9:49 PM, Steven D'Aprano > wrote: >> As an extra bonus, even when searching is not reliant on Javascript, >> mangling the text in the search box often is, so unless I'm extra

[issue33153] interpreter crash when multiplying large tuples

2018-03-27 Thread Ivan Zakharyaschev
New submission from Ivan Zakharyaschev : The issue https://bugs.python.org/msg314475 has arisen for tuples (but not for lists, as in the example there) in 2.7.14 for me. How should we fix it in a better way? This bug is not reproducible in python 3.5.4. [builder@localhost

[issue1704621] interpreter crash when multiplying large lists

2018-03-27 Thread Ivan Zakharyaschev
Ivan Zakharyaschev added the comment: New issue filed: https://bugs.python.org/issue33153 -- ___ Python tracker ___

[issue33153] interpreter crash when multiplying large tuples

2018-03-27 Thread Ivan Zakharyaschev
Ivan Zakharyaschev added the comment: I meant the old issue https://bugs.python.org/issue1704621 . -- ___ Python tracker ___

Re: please test the new PyPI (now in beta)

2018-03-27 Thread Wolfgang Maier
For me, that's a window width issue. The sidebar with the filters only shows when the window is wide enough. Unfortunately, the text mentioning it doesn't change, so this should be fixed. On 03/27/2018 12:06 PM, Steven D'Aprano wrote: On Tue, 27 Mar 2018 10:48:15 +0100, Paul Moore wrote:

Re: please test the new PyPI (now in beta)

2018-03-27 Thread Tim Golden
On 27/03/2018 11:06, Steven D'Aprano wrote: On Tue, 27 Mar 2018 10:48:15 +0100, Paul Moore wrote: By the way, on the search page: https://pypi.org/search/ it says "Enter a search query above, or select a filter from the list of classifiers on the left" but there is no such filter or list of

[issue31853] Use super().method instead of socket.method in SSLSocket

2018-03-27 Thread Mads Jensen
Mads Jensen added the comment: There are lots of legacy calls in the form of ClassName.method, which should be replaced with super().method. -- components: +email -SSL nosy: +barry, r.david.murray pull_requests: +5996 ___ Python

[issue33156] Use super().method instead in email classes.

2018-03-27 Thread Serhiy Storchaka
Change by Serhiy Storchaka : -- type: -> enhancement ___ Python tracker ___

Re: Ruby parens-free function calls [was Re: Accessing parent objects]

2018-03-27 Thread Rick Johnson
On Tuesday, March 27, 2018 at 3:24:48 AM UTC-5, Steven D'Aprano wrote: > On Mon, 26 Mar 2018 11:37:35 -0700, Rick Johnson wrote: > Printing a string and calling a function is obfuscated code? Deary me. When the programmer can't be bothered to invent names more descriptive than `a` and `b`, why

Re: String Formatting with new .format()

2018-03-27 Thread Ganesh Pal
> > > Or maybe they're not giving the same result. I'm a little confused here. > > Thanks Chris, for the reply they appear to give the same result . -- https://mail.python.org/mailman/listinfo/python-list

[issue33154] subprocess.Popen ResourceWarning should have activation-deactivation flags

2018-03-27 Thread Arno-Can Uestuensoez
Arno-Can Uestuensoez added the comment: See also issue26741 - subprocess.Popen should emit a ResourceWarning in destructor if ... -- ___ Python tracker

[issue31853] Use super().method instead of socket.method in SSLSocket

2018-03-27 Thread Christian Heimes
Christian Heimes added the comment: I agree Also this ticket was closed a couple of months ago and is about the SSL module. Your PR is about a different module. Although I think that recycling is generally a good idea, it doesn't apply to ticket numbers. --

Re: please test the new PyPI (now in beta)

2018-03-27 Thread Steven D'Aprano
On Tue, 27 Mar 2018 10:48:15 +0100, Paul Moore wrote: >> By the way, on the search page: >> >> https://pypi.org/search/ >> >> >> it says "Enter a search query above, or select a filter from the list >> of classifiers on the left" but there is no such filter or list of >> classifiers. > > Do you

Re: please test the new PyPI (now in beta)

2018-03-27 Thread Steven D'Aprano
On Tue, 27 Mar 2018 11:03:00 +0100, Paul Moore wrote: > Digging into this further, the design work on the Warehouse site has > been ongoing since late 2015, and there was an extensive user testing > phase, Oh? What did they test the user for? Whatever it was, it was a pity they didn't test them

[issue31853] Use super().method instead of socket.method in SSLSocket

2018-03-27 Thread INADA Naoki
INADA Naoki added the comment: Why *should*? Legacy ParentClass.method() call is faster than super().method() call, because there are no temporary proxy object. I don't think there are enough reason to replace all legacy parent calls. -- nosy: +inada.naoki

[issue33155] Use super().method instead in Logging

2018-03-27 Thread Mads Jensen
New submission from Mads Jensen : There are lots of legacy calls in the form of ClassName.method, which should be replaced with super().method. This is an issue in many modules; I've been asked to create a report for each module that the PR touches. -- components:

[issue33155] Use super().method instead in Logging

2018-03-27 Thread Serhiy Storchaka
Change by Serhiy Storchaka : -- nosy: +vinay.sajip type: -> enhancement versions: +Python 3.8 ___ Python tracker ___

[issue33153] interpreter crash when multiplying large tuples

2018-03-27 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: tuplerepeat() in Objects/tupleobject.c uses a questionable check that relies on signed integer overflow. It is a matter of time when this rifle will shoot in the foot. But I didn't expected issues with old good gcc 6.3. Was the

Re: Ruby parens-free function calls [was Re: Accessing parent objects]

2018-03-27 Thread Rick Johnson
On Tuesday, March 27, 2018 at 1:55:01 AM UTC-5, Gregory Ewing wrote: > Chris Angelico wrote: > > Question: How do you get a reference to a Ruby function? Or are they > > not first-class objects? > > They're not first-class. So, you can't. If Chris means: "how do you get a reference to a Ruby

condition.acquire vs lock.acquire

2018-03-27 Thread jayshankar nair via Python-list
Hi, Is condition.acquire(threading.Condition()) similar to lock.acquire(threading.Lock). Does both of get access to the lock. Can i use condition.wait,notify with lock.acquire or i have to use condition.wait, notify with condition.acquire. cond.acquire()  // can i replace with lock.acquire   

Re: (no subject)

2018-03-27 Thread Rick Johnson
On Tuesday, March 27, 2018 at 7:19:53 AM UTC-5, kevon harris wrote: > Unable to pull up IDLE after downloading Python 3.6.4 > > Sent from Mail for Windows 10 What OS? On Windows running Python2.X, IDLE is located @ '/Python2X/Lib/idlelib/idle.pyw' --

[issue16482] pdb.set_trace() clobbering traceback on error

2018-03-27 Thread daniel hahler
daniel hahler added the comment: Just for reference: https://github.com/python/cpython/pull/6233 is about fixing this. -- keywords: +patch nosy: +blueyed pull_requests: +5995 stage: needs patch -> patch review ___ Python

[issue31853] Use super().method instead of socket.method in SSLSocket

2018-03-27 Thread Nathaniel Smith
Nathaniel Smith added the comment: The only time this should matter semantically is if someone is trying to subclass SSLSocket and use multiple inheritance. This is something that people *really* shouldn't do. It also potentially makes it harder to backport ssl changes to

[no subject]

2018-03-27 Thread kevon harris
Unable to pull up IDLE after downloading Python 3.6.4 Sent from Mail for Windows 10 -- https://mail.python.org/mailman/listinfo/python-list

[issue33146] contextlib.suppress should capture exception for inspection and filter on substrings

2018-03-27 Thread Nick Coghlan
Nick Coghlan added the comment: I wouldn't expand the scope of contextlib.suppress, since it has a pretty clear purpose: pretend the exception never happened. (This was even clearer with the original "ignored" name, before I was talked into changing it to use the current

Re: To super or not to super (Re: Accessing parent objects)

2018-03-27 Thread Antoon Pardon
On 27-03-18 08:21, Gregory Ewing wrote: > The idea that super() is *always* the right way to call > inherited methods in a multiple inheritance environment > seems to have been raised by some people to the level > of religous dogma. > > I don't buy it. In order for it to work, the following > two

[issue33153] interpreter crash when multiplying large tuples

2018-03-27 Thread INADA Naoki
INADA Naoki added the comment: Would you paste traceback? -- nosy: +inada.naoki ___ Python tracker ___

[issue33111] Merely importing tkinter breaks parallel code (multiprocessing, sharedmem)

2018-03-27 Thread Ronald Oussoren
Ronald Oussoren added the comment: @ezwelty: The import of multiprocessing and the call to set_start_method should be at the very start of the code, before other imports, to avoid the annoying Apple behavior I mentioned. --

[issue33156] Use super().method instead in email classes.

2018-03-27 Thread Mads Jensen
New submission from Mads Jensen : There are lots of legacy calls in the form of ClassName.method, which should be replaced with super().method. -- components: email messages: 314519 nosy: barry, madsjensen, r.david.murray priority: normal pull_requests: 5997 severity:

[issue32569] Blake2 module, memory clearance update

2018-03-27 Thread David CARLIER
David CARLIER added the comment: Little update it has been accepted and merged today : https://github.com/BLAKE2/libb2/commit/620681a3b15c4d7239b9323b9da5ea208a959d3d -- nosy: +David CARLIER2 ___ Python tracker

[issue33128] PathFinder is twice on sys.meta_path

2018-03-27 Thread Pablo Galindo Salgado
Pablo Galindo Salgado added the comment: It seems that the problem is that `_Py_InitializeEx_Private` calls `_Py_InitializeCore` and `_Py_InitializeMainInterpreter`. The first one calls at the end `initimport` that in turns calls `importlib._install_external_importers`

[issue33128] PathFinder is twice on sys.meta_path

2018-03-27 Thread Pablo Galindo Salgado
Change by Pablo Galindo Salgado : -- keywords: +patch pull_requests: +6001 stage: needs patch -> patch review ___ Python tracker

Re: please test the new PyPI (now in beta)

2018-03-27 Thread dieter
Tim Golden writes: > ... > In either case, talking about it > here seems fruitless. Someone asked for feedback here. At least he should look for it here. -- https://mail.python.org/mailman/listinfo/python-list

[issue33142] Fatal Python error: Py_Initialize: Unable to get the locale encoding on Debian/Python 3.6.4 source build

2018-03-27 Thread Ned Deily
Ned Deily added the comment: Since python3.6 is regularly built with various Debian releases, this seems unlikely to be a problem in Python itself. Suggest you verify that no venv or virtualenv is in use or that PYTHON* environment variables are set or that no modifications

[issue32872] backport of #32305 causes regressions in various packages

2018-03-27 Thread Ned Deily
Change by Ned Deily : -- pull_requests: +6003 ___ Python tracker ___ ___ Python-bugs-list

[issue32872] backport of #32305 causes regressions in various packages

2018-03-27 Thread miss-islington
Change by miss-islington : -- pull_requests: +6005 ___ Python tracker ___

[issue32872] backport of #32305 causes regressions in various packages

2018-03-27 Thread miss-islington
Change by miss-islington : -- pull_requests: +6004 ___ Python tracker ___

[issue32872] backport of #32305 causes regressions in various packages

2018-03-27 Thread Ned Deily
Ned Deily added the comment: New changeset e52ac045972a4f75d7f52e4ee0d6de128259134d by Ned Deily in branch 'master': bpo-32872: Avoid regrtest compatibility issue with namespace packages. (GH-6276)

Re: Welcome to the "Python-list" mailing list

2018-03-27 Thread nadir musallam
Dear All, Kind reminder on the below please, if there is a separate mailing list for installation problems I’d appreciate if you’d let me know. Warm regards, Nadir Sent from my iPhone On Mar 26, 2018, at 8:40 PM, nadir musallam >

[issue33161] Refactor of pathlib's _WindowsBehavior.gethomedir

2018-03-27 Thread Ekin Dursun
New submission from Ekin Dursun : At line 245, default value for drv is provided with KeyError handling, but it is better to use dict's get method. -- components: Library (Lib), Windows messages: 314562 nosy: onlined, paul.moore, steve.dower, tim.golden, zach.ware

[issue33153] interpreter crash when multiplying large tuples

2018-03-27 Thread Ivan Zakharyaschev
Ivan Zakharyaschev added the comment: The traceback: [builder@localhost ~]$ python -c 'x = ("a", "b") * 2**20; x *= 2**20' Segmentation fault (core dumped) [builder@localhost ~]$ gdb python core.23284 GNU gdb (GDB) 7.9-alt4 (ALT) Copyright (C) 2015 Free Software Foundation,

Re: Welcome to the "Python-list" mailing list

2018-03-27 Thread Terry Reedy
On 3/27/2018 11:06 AM, nadir musallam wrote: I have tried installing Python3.6.4 on my computer as I am eager to begin a What exactly did you do? new career in data analytics. However I am running in to some problems when attempting to set up the software. I have downloaded Dev C++ software

Re: Pep8 for long pattern

2018-03-27 Thread Rick Johnson
On Tuesday, March 27, 2018 at 9:37:14 PM UTC-5, Dan Stromberg wrote: > I can easily get 132+ columns of a font large enough for my > 52 year old eyes on a 15" laptop. Well, if you're comfortable with the long lines, fine. But be aware that long lines are poo-pooed in most professional

Re: Pep8 for long pattern

2018-03-27 Thread Rick Johnson
On Tuesday, March 27, 2018 at 4:02:37 PM UTC-5, Dan Stromberg wrote: > On Tue, Mar 27, 2018 at 8:18 AM, Michael Torrie wrote: > > But when it's exactly what you need, why do you need to > > shoehorn the expression into 79 characters? Seems > > pointless in a case like this.

[issue24132] Direct sub-classing of pathlib.Path

2018-03-27 Thread qb-cea
qb-cea added the comment: Hi all, I made a pull request proposing a fix for this issue. There is still quite a lot to be done: - I exposed some variables (and probably methods too) that used to be hidden; - I did not update the documentation; - I did not add a proper

[issue32850] Run gc_collect() before complaining about dangling threads

2018-03-27 Thread Nathaniel Smith
Nathaniel Smith added the comment: @Victor: So to make sure I understand, the point of the check is to complain about reference cycles involving thread objects, because when those happen in the stdlib you consider them bugs? -- ___

[issue33128] PathFinder is twice on sys.meta_path

2018-03-27 Thread Pablo Galindo Salgado
Pablo Galindo Salgado added the comment: The same problem happens in `new_interpreter` as far as I understand. -- ___ Python tracker

Re: Ruby parens-free function calls [was Re: Accessing parent objects]

2018-03-27 Thread Rick Johnson
On Tuesday, March 27, 2018 at 4:47:05 PM UTC-5, Gregory Ewing wrote: > Rick Johnson wrote: > > rb> Object.method("print_name").call("Meathead") > > Yes, but the point is that you have to have to use a different > syntax to call it. This is like having to say > > f.__call__(arg) > > in

Re: Ruby parens-free function calls [was Re: Accessing parent objects]

2018-03-27 Thread Steven D'Aprano
On Tue, 27 Mar 2018 09:28:34 -0700, Rick Johnson wrote: > On Tuesday, March 27, 2018 at 8:46:54 AM UTC-5, Chris Angelico wrote: [...] > > Cool, so Greg was right: you can't get a reference to a method or > > function. You need magic to simulate it. > > Since when did utilizing a method to request

Re: Ruby parens-free function calls [was Re: Accessing parent objects]

2018-03-27 Thread Rick Johnson
On Tuesday, March 27, 2018 at 6:55:23 PM UTC-5, Steven D'Aprano wrote: > On Tue, 27 Mar 2018 09:28:34 -0700, Rick Johnson wrote: [...] > > Since when did utilizing a method to request a specific > > value become some sort of magic? > > Since it requires a special method that has super powers no >

Re: Pep8 for long pattern

2018-03-27 Thread Dan Stromberg
On Tue, Mar 27, 2018 at 4:37 PM, Rick Johnson wrote: > On Tuesday, March 27, 2018 at 4:02:37 PM UTC-5, Dan Stromberg wrote: >> On Tue, Mar 27, 2018 at 8:18 AM, Michael Torrie wrote: >> > But when it's exactly what you need, why do you need to >> >

[issue32850] Run gc_collect() before complaining about dangling threads

2018-03-27 Thread Matthias Urlichs
Matthias Urlichs added the comment: > It's a deliberate choice. It helped me to find real bugs. For example, I > found a very old reference cycle in socket.create_connection(). Fair enough; I will change the patch to complain before gc'ing. --

[issue33161] Refactor of pathlib's _WindowsBehavior.gethomedir

2018-03-27 Thread Ekin Dursun
Change by Ekin Dursun : -- keywords: +patch pull_requests: +6002 stage: -> patch review ___ Python tracker ___

Re: Ruby parens-free function calls [was Re: Accessing parent objects]

2018-03-27 Thread Chris Angelico
On Wed, Mar 28, 2018 at 1:22 PM, Rick Johnson wrote: > On Tuesday, March 27, 2018 at 6:55:23 PM UTC-5, Steven D'Aprano wrote: >> On Tue, 27 Mar 2018 09:28:34 -0700, Rick Johnson wrote: > [...] >> > Since when did utilizing a method to request a specific >> > value

Re: please test the new PyPI (now in beta)

2018-03-27 Thread Ian Kelly
On Mon, Mar 26, 2018 at 4:16 PM, Sumana Harihareswara wrote: > The new Python Package Index at https://pypi.org is now in beta. > > This means the site is robust, but we anticipate needing more user > testing and changes before it is "production-ready" and can fully > replace

[issue33153] interpreter crash when multiplying large tuples

2018-03-27 Thread Ivan Zakharyaschev
Ivan Zakharyaschev added the comment: It was run in i586 chroot on x86_64. -- ___ Python tracker ___

Re: Ruby parens-free function calls [was Re: Accessing parent objects]

2018-03-27 Thread Chris Angelico
On Tue, Mar 27, 2018 at 11:00 PM, Rick Johnson wrote: > On Tuesday, March 27, 2018 at 1:55:01 AM UTC-5, Gregory Ewing wrote: >> Chris Angelico wrote: >> > Question: How do you get a reference to a Ruby function? Or are they >> > not first-class objects? >> >> They're

Re: To super or not to super (Re: Accessing parent objects)

2018-03-27 Thread Steven D'Aprano
On Tue, 27 Mar 2018 19:21:38 +1300, Gregory Ewing wrote: > The idea that super() is *always* the right way to call inherited > methods in a multiple inheritance environment seems to have been raised > by some people to the level of religous dogma. "Always"? Well, you could always avoid super()

[issue33152] Use list comprehension in timeit module instead of loop with append

2018-03-27 Thread Pablo Galindo Salgado
Change by Pablo Galindo Salgado : -- title: clean code -> Use list comprehension in timeit module instead of loop with append ___ Python tracker

[issue33144] random._randbelow optimization

2018-03-27 Thread Wolfgang Maier
Wolfgang Maier added the comment: Thanks, Raymond. I'll do that once I've addressed Serhiy's points. -- ___ Python tracker

[issue33156] Use super().method instead in email classes.

2018-03-27 Thread R. David Murray
R. David Murray added the comment: Thank you for wanting to improve Python, but unless this is actually causing a problem for someone, there is a greater chance of introducing a bug by making such changes than the benefit of the "cleanup". So we generally don't accept

Re: (unknown)

2018-03-27 Thread Terry Reedy
On 3/27/2018 3:27 AM, kevon harris wrote: Unable to pull up IDLE after downloading Python 3.6.4 What did you download? How did you install after downloading? Can you run 3.6 after installing? How did you try to run IDLE? Can you use Command Prompt? -- Terry Jan Reedy --

[issue32861] urllib.robotparser: incomplete __str__ methods

2018-03-27 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: The default entry was moved out of entries added in issue523041, but RobotFileParser.__str__ was not updated. Support for "Crawl-delay" and "Request-Rate" was added in issue16099, but Entry.__str__ was not updated. This looks

Re: Pep8 for long pattern

2018-03-27 Thread Serhiy Storchaka
27.03.18 17:17, Ganesh Pal пише: How do I split the below regex , so that it fits within the character limit of 79 words pattern = [ r'(?P([0-9a-fA-F]+:[0-9a-fA-F]+:[0-9a-fA-F]+:[0-9a-fA-F]+:[0-9a-fA-F]+::HEAD))',

Re: To super or not to super (Re: Accessing parent objects)

2018-03-27 Thread Ian Kelly
On Tue, Mar 27, 2018 at 12:21 AM, Gregory Ewing wrote: > The idea that super() is *always* the right way to call > inherited methods in a multiple inheritance environment > seems to have been raised by some people to the level > of religous dogma. > > I don't buy it.

Re: To super or not to super (Re: Accessing parent objects)

2018-03-27 Thread Ian Kelly
On Tue, Mar 27, 2018 at 8:47 AM, Ian Kelly wrote: > On Tue, Mar 27, 2018 at 12:21 AM, Gregory Ewing > wrote: >> The trouble is, those conditions don't always hold. >> Often when overriding a method, you want to do something >> *instead* of what

Re: (unknown)

2018-03-27 Thread Grant Edwards
On 2018-03-27, kevon harris wrote: > Unable to pull up IDLE after downloading Python 3.6.4 Ah. What happens when you push down instead of pull up? > Sent from Mail for Windows 10 Sent from mutt for Gentoo Linux -- https://mail.python.org/mailman/listinfo/python-list

[issue33152] Use list comprehension in timeit module instead of loop with append

2018-03-27 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: We usually do not do such kind of changes due to the risk of introducing new bugs (as your PR demonstrated). Only when other changes are applied to the module, the surrounded code can be cleaned up. Or the maintainer of the

[issue33157] Strings beginning with underscore not removed from lists - feature or bug?

2018-03-27 Thread Xiang Zhang
Xiang Zhang added the comment: You may refer to stackoverflow for an explanation, for example, https://stackoverflow.com/questions/6260089/strange-result-when-removing-item-from-a-list -- ___ Python tracker

Pep8 for long pattern

2018-03-27 Thread Ganesh Pal
Hello Python friends, How do I split the below regex , so that it fits within the character limit of 79 words pattern = [ r'(?P([0-9a-fA-F]+:[0-9a-fA-F]+:[0-9a-fA-F]+:[0-9a-fA-F]+:[0-9a-fA-F]+::HEAD))', r'(?P(owner:\s+[0-9a-fA-F]+:[0-9a-fA-F]+:[0-9a-fA-F]+:[0-9a-fA-F]+:[0-9a-fA-F]+::HEAD))',

[issue33111] Merely importing tkinter breaks parallel code (multiprocessing, sharedmem)

2018-03-27 Thread Ethan Welty
Ethan Welty added the comment: @ronaldoussoren: The order of the imports made no difference. Even with the call at the top, I got endless errors with both 'spawn' and 'forkserver', with or without importing a graphics backend. Only 'fork' works, and only if a graphics

Re: String Formatting with new .format()

2018-03-27 Thread Michael Torrie
On 03/26/2018 09:37 AM, Ganesh Pal wrote: > Hi Team, > > Just a quick suggestion, on string formatting with .format() which of the > below is better , given both give the same result . No they don't. Look more closely at the output. attempts = 1 msg2 = "Hello" print "Retry

[issue31550] Inconsistent error message for TypeError with subscripting

2018-03-27 Thread Raymond Hettinger
Raymond Hettinger added the comment: Marked as closed for the reasons listed. Thank you for the suggestion, but we're going to decline. -- resolution: -> rejected stage: patch review -> resolved status: open -> closed

Re:

2018-03-27 Thread Dan Stromberg
Please at least skim http://www.catb.org/esr/faqs/smart-questions.html On Tue, Mar 27, 2018 at 12:27 AM, kevon harris wrote: > Unable to pull up IDLE after downloading Python 3.6.4 -- https://mail.python.org/mailman/listinfo/python-list

Re: please test the new PyPI (now in beta)

2018-03-27 Thread Bill Deegan
The back ground blue on the pypi page is the highlight blue on the python.org page, they should change the color to match to background python.org color. -Bill On Tue, Mar 27, 2018 at 7:50 AM, Steven D'Aprano < steve+comp.lang.pyt...@pearwood.info> wrote: > On Tue, 27 Mar 2018 22:25:44

Re: Pep8 for long pattern

2018-03-27 Thread Paul Moore
Use re.X - see https://docs.python.org/3.6/library/re.html#re.X for details. On 27 March 2018 at 15:17, Ganesh Pal wrote: > Hello Python friends, > > How do I split the below regex , so that it fits within the character > limit of 79 words > > > pattern = [ >

[issue33157] Strings beginning with underscore not removed from lists - feature or bug?

2018-03-27 Thread yemiteliyadu
New submission from yemiteliyadu : Strings beginning with underscore not removed from lists Reproducible as shown below: Python 3.6.4 |Anaconda custom (64-bit)| (default, Jan 16 2018, 12:04:33) [GCC 4.2.1 Compatible Clang 4.0.1 (tags/RELEASE_401/final)] on darwin

Re: Pep8 for long pattern

2018-03-27 Thread Michael Torrie
On 03/27/2018 08:17 AM, Ganesh Pal wrote: > Hello Python friends, > > How do I split the below regex , so that it fits within the character > limit of 79 words > > > pattern = [ > r'(?P([0-9a-fA-F]+:[0-9a-fA-F]+:[0-9a-fA-F]+:[0-9a-fA-F]+:[0-9a-fA-F]+::HEAD))', > >

[issue33157] Strings beginning with underscore not removed from lists - feature or bug?

2018-03-27 Thread Xiang Zhang
Xiang Zhang added the comment: It's just the right behavior. You are modifying the list while iterating over it. It has no business of underscore. >>> test = ['_a', 'a', '_b', 'b'] >>> for i in test: test.remove(i) >>> test ['a', 'b'] -- nosy: +xiang.zhang

  1   2   >