[Python-Dev] Hashes in Python3.5 for tuples and frozensets

2018-05-16 Thread Anthony Flury via Python-Dev
frequently as hash keys - but I would think that tuples are regularly used. Since that their hashes are not salted does the vulnerability still exist in some form ?. -- -- Anthony Flury email : *anthony.fl...@btinternet.com* Twitter : *@TonyFlury <https://twitter.com/TonyFlury/>* __

Re: [Python-Dev] Hashes in Python3.5 for tuples and frozensets

2018-05-17 Thread Anthony Flury via Python-Dev
d. The denial of service is more likely to occur with strings as keys, than with integers. See the following link for more information: http://python-security.readthedocs.io/vuln/cve-2012-1150_hash_dos.html Victor 2018-05-16 17:48 GMT-04:00 Anthony Flury via Python-Dev : This may be known but I w

Re: [Python-Dev] Hashes in Python3.5 for tuples and frozensets

2018-05-17 Thread Anthony Flury via Python-Dev
on the speed of that operation; without consideration of how often that operation is used. On 17/05/18 09:16, Chris Angelico wrote: On Thu, May 17, 2018 at 5:21 PM, Anthony Flury via Python-Dev wrote: Victor, Thanks for the link, but to be honest it will just confuse people - neither the link

Re: [Python-Dev] [python-committers] FINAL WEEK FOR 3.7.0 CHANGES!

2018-05-18 Thread Ivan Pozdeev via Python-Dev
ould be searched on a different branch. The text of entries in different versions can also be different because the same issue can change the behavior on the master and backport the part of changes as a bugfix. Not all bugs apply to all, or multiple branches, so that wouldn't filter them out rel

Re: [Python-Dev] Normalisation of unicode and keywords

2018-05-18 Thread Ivan Pozdeev via Python-Dev
equal, or they shouldn't. They can't be considered "partially" equal. -- Regards, Ivan ___________________ Python-Dev mailing list Python-Dev@python.org https://mail.python.org/mailman/listinfo/python-dev Unsubscribe: https://mail.python.

Re: [Python-Dev] My fork lacks a 3.7 branch - can I create it somehow?

2018-05-22 Thread Ivan Pozdeev via Python-Dev
lations locally, then upload the changed topic branches to your fork. I found this easier than having everything in your fork 'cuz it saves you the hassle of keeping your copies up-to-date and having unexpected merge conflicts in your PRs if the copies get out of date. Skip _________

Re: [Python-Dev] PEP 574 (pickle 5) implementation and backport available

2018-05-25 Thread Ivan Pozdeev via Python-Dev
e format is unreadable as it is, compression will make it literally impossible to diagnose problems. Python supports transparent compression, e.g. with the 'zlib' codec. Raymond _______________ Python-Dev mailing list Python-Dev@python.org https://mail

Re: [Python-Dev] How to watch buildbots?

2018-05-30 Thread Ivan Pozdeev via Python-Dev
ist! Introduce yourself and explain how do you plan to help. I may propose to mentor you to assist you the first weeks. As I wrote, maybe a first step would be to write down a documentation how to deal with buildbots and/or update and complete existing documentations. https://devguide.python.org/

[Python-Dev] What is the command to upgrade python 3.6.5 to 3.7.5?

2018-05-31 Thread Jonathan Tsang via Python-Dev
Hi Dev. Support,  Is there a command that can help me to upgrade python 3.6.5 to 3.7.5 without uninstall and reinstall please? Thanks,Jonathan___ Python-Dev mailing list Python-Dev@python.org https://mail.python.org/mailman/listinfo/python-dev

Re: [Python-Dev] What is the command to upgrade python 3.6.5 to 3.7.5?

2018-05-31 Thread Ivan Pozdeev via Python-Dev
https://stackoverflow.com/questions/15102943/how-to-update-python/50616351#50616351 On 01.06.2018 5:22, Jonathan Tsang via Python-Dev wrote: Hi Dev. Support,  Is there a command that can help me to upgrade python 3.6.5 to 3.7.5 without uninstall and reinstall please? Thanks, Jonathan

Re: [Python-Dev] How to watch buildbots?

2018-05-31 Thread Ivan Pozdeev via Python-Dev
On 30.05.2018 16:36, Nick Coghlan wrote: On 30 May 2018 at 22:30, Ivan Pozdeev via Python-Dev mailto:python-dev@python.org>> wrote: What's the big idea of separate buildbots anyway? I thought the purpose of CI is to test everything _before_ it breaks the main codebase

Re: [Python-Dev] Keeping an eye on Travis CI, AppVeyor and buildbots: revert on regression

2018-06-04 Thread Ivan Pozdeev via Python-Dev
Fedora 3.x, PPC64LE Fedora 3.x, s390x RHEL 3.x: https://bugs.python.org/issue33630 * AIX: always red * USBan: experimental buildbot * Alpine: platform not supported yet (musl issues) Victor _______ Python-Dev mailing list Python-Dev@python.org https://mai

Re: [Python-Dev] Microsoft to acquire GitHub for $7.5 billion

2018-06-04 Thread Ivan Pozdeev via Python-Dev
n its effectiveness. Actually, since M$ has closely integrated Python into VS, I'm expecting Guido to receive an acquisition offer next! -- ~Ethan~ _______ Python-Dev mailing list Python-Dev@python.org https://mail.python.org/mailman/listinfo/python-dev U

Re: [Python-Dev] Why not using "except: (...) raise" to cleanup on error?

2018-06-04 Thread Ivan Pozdeev via Python-Dev
les at its core, tops, that can be extracted by skimming through its docs. ChrisA ___ Python-Dev mailing list Python-Dev@python.org https://mail.python.org/mailman/listinfo/python-dev Unsubscribe: https://mail.python.org/mailman/options/python-dev/vano%40mail.mipt.ru -- Regards, Ivan __

[Python-Dev] Docstrings on builtins

2018-06-04 Thread Chris Barker via Python-Dev
-- Christopher Barker, Ph.D. Oceanographer Emergency Response Division NOAA/NOS/OR&R(206) 526-6959 voice 7600 Sand Point Way NE (206) 526-6329 fax Seattle, WA 98115 (206) 526-6317 main reception chris.bar...@noaa.gov _______________ Py

Re: [Python-Dev] Why not using "except: (...) raise" to cleanup on error?

2018-06-04 Thread Ivan Pozdeev via Python-Dev
s even easier in Python, 'cuz the core values are officially formulated as Python Zen, and any module has one or two governing principles at its core, tops, that can be extracted by skimming through its docs. ChrisA ___________ Python-Dev mailing list Python

Re: [Python-Dev] Why not using "except: (...) raise" to cleanup on error?

2018-06-04 Thread Ivan Pozdeev via Python-Dev
)). The best way, however, would probably be for anyone dealing with a design change to remember to make this check. This is even easier in Python, 'cuz the core values are officially formulated as Python Zen, and any module has one or two governing principles at its core, tops, that can

Re: [Python-Dev] Docstrings on builtins

2018-06-04 Thread Chris Barker via Python-Dev
t; Clinic and then run "make clinic" to regenerate the generated files. > good idea. Now to find some time to actually work on this... -CHB > Victor > > 2018-06-04 23:45 GMT+02:00 Chris Barker via Python-Dev < > python-dev@python.org>: > > Over on pytho

Re: [Python-Dev] Docstrings on builtins

2018-06-04 Thread Ivan Pozdeev via Python-Dev
tests for mutability. Feel free to open an issue on the IPython repo. Btw IPython is uppercase I, and we don't want any troupe with the fruit giant. -- M On Mon, 4 Jun 2018 at 16:30, Chris Barker via Python-Dev mailto:python-dev@python.org>> wrote: On Mon, Jun 4, 2018 at

Re: [Python-Dev] Docstrings on builtins

2018-06-05 Thread Chris Barker via Python-Dev
wrote: > > > On Mon, 4 Jun 2018 at 17:29, Ivan Pozdeev via Python-Dev < > python-dev@python.org> wrote: > >> On 05.06.2018 3:09, Matthias Bussonnier wrote: >> >> This may even be a bug/feature of IPython, >> >> I see that inspect.signature(ti

Re: [Python-Dev] Docstrings on builtins

2018-06-05 Thread Ivan Pozdeev via Python-Dev
y do the same. -CHB On Mon, Jun 4, 2018 at 6:21 PM, Matthias Bussonnier mailto:bussonniermatth...@gmail.com>> wrote: On Mon, 4 Jun 2018 at 17:29, Ivan Pozdeev via Python-Dev mailto:python-dev@python.org>> wrote: On 05.06.2018 3:09, Matthias Bussonnier

Re: [Python-Dev] Microsoft to acquire GitHub for $7.5 b

2018-06-05 Thread Ivan Pozdeev via Python-Dev
ed to."/ ---- *From:* Python-Dev on behalf of M.-A. Lemburg *Sent:* Tuesday, June 5, 2018 7:54 AM *To:* Antoine Pitrou; python-dev@python.org *Subject:* Re: [Python-Dev] Microsoft to acquire GitHub for $7.5 billion Something that may change is the way they tr

[Python-Dev] Python3 compiled listcomp can't see local var - bug or feature?

2018-06-05 Thread Rob Cliffe via Python-Dev
    16 GET_ITER 18 CALL_FUNCTION    1 20 CALL_FUNCTION    1 22 POP_TOP 24 LOAD_CONST   4 (None) 26 RETURN_VALUE You will see that in Python 3.6.5 the dis output for the second code object does not

Re: [Python-Dev] Keeping an eye on Travis CI, AppVeyor and buildbots: revert on regression

2018-06-06 Thread Ivan Pozdeev via Python-Dev
d token ID, I get a different error: just the string "access denied", instead of a JSON dictionary. First I was also confused between travis-ci.com and travis-ci.org ... The documentation shows an example with .com, but Python organization uses .org. Victor -- Regards, Ivan ___

Re: [Python-Dev] Docstrings on builtins

2018-06-06 Thread Chris Barker via Python-Dev
on, Jun 4, 2018 at 6:21 PM, Matthias Bussonnier < > bussonniermatth...@gmail.com> wrote: > >> >> >> On Mon, 4 Jun 2018 at 17:29, Ivan Pozdeev via Python-Dev < >> python-dev@python.org> wrote: >> >>> On 05.06.2018 3:09, Matthias Bussonnier wrote: >

Re: [Python-Dev] Python3 compiled listcomp can't see local var - bug or feature?

2018-06-11 Thread Rob Cliffe via Python-Dev
e out of the list comprehension was a bad idea. Think of the Py3 behavior as one of those "corrections" to things which were "got wrong" in Python 1 or 2. :-) Skip --- This email has been checked for viruses by AVG. http://www.avg.com ______________

Re: [Python-Dev] Python3 compiled listcomp can't see local var - bug or feature?

2018-06-12 Thread Rob Cliffe via Python-Dev
Ah yes, I see what you mean: class Test():    x = 1    print (x) # Prints 1    print([x+i for i in range(1,3)])  # NameError (x) Anyway, I  apologise for posting to Python-Dev on was a known issue, and turned out to be more me asking for help with

Re: [Python-Dev] A more flexible task creation

2018-06-14 Thread Chris Barker via Python-Dev
attle, WA 98115 (206) 526-6317 main reception chris.bar...@noaa.gov _______ Python-Dev mailing list Python-Dev@python.org https://mail.python.org/mailman/listinfo/python-dev Unsubscribe: https://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com

Re: [Python-Dev] About [].append == [].append

2018-06-21 Thread Ivan Pozdeev via Python-Dev
ternally rarely uses "is" for comparisons. See also: - https://bugs.python.org/issue1617161 - https://bugs.python.org/issue33925 Any opinions? Jeroen. _______ Python-Dev mailing list Python-Dev@python.org https://mail.python.org/m

Re: [Python-Dev] About [].append == [].append

2018-06-21 Thread Ivan Pozdeev via Python-Dev
On 21.06.2018 16:39, Steven D'Aprano wrote: On Thu, Jun 21, 2018 at 02:33:27PM +0300, Ivan Pozdeev via Python-Dev wrote: First, tell us what problem you're solving. You might not be aware of the context of Jereon's question. He is the author of PEP 579 and 580, so I expect he

Re: [Python-Dev] About [].append == [].append

2018-06-21 Thread Ivan Pozdeev via Python-Dev
different side effect. The use case for using "is" for __self__ is described by the OP of issue1617161. I don't know use cases for using "==". There is a related problem of hashing. Currently bound methods are not hashable if __self__ is not hashable. This

Re: [Python-Dev] About [].append == [].append

2018-06-22 Thread Ivan Pozdeev via Python-Dev
see anything in the docs about method equality semantics. If that's true, it's an implementation detail, and users shouldn't rely on it. Consequently, anything is "desirable" that is sufficient for the Python codebase. -- Regards, Ivan ___________

Re: [Python-Dev] Informal educator feedback on PEP 572 (was Re: 2018 Python Language Summit coverage, last part)

2018-06-22 Thread Chris Barker via Python-Dev
ax Seattle, WA 98115 (206) 526-6317 main reception chris.bar...@noaa.gov _______ Python-Dev mailing list Python-Dev@python.org https://mail.python.org/mailman/listinfo/python-dev Unsubscribe: https://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com

Re: [Python-Dev] PySequence_Check but no __len__

2018-06-22 Thread Ivan Pozdeev via Python-Dev
d that a C-API function calls something a 'sequence' without it having __len__. A practical sequence check is checking for __iter__ . An iterator doesn't necessarily have a defined length -- e.g. a stream or a generator. -- Regards, Ivan _________

Re: [Python-Dev] PySequence_Check but no __len__

2018-06-22 Thread Ivan Pozdeev via Python-Dev
_______________ Python-Dev mailing list Python-Dev@python.org https://mail.python.org/mailman/listinfo/python-dev Unsubscribe: https://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com

Re: [Python-Dev] Informal educator feedback on PEP 572 (was Re: 2018 Python Language Summit coverage, last part)

2018-06-22 Thread Chris Barker via Python-Dev
a little bit more complexity -CHB -- Christopher Barker, Ph.D. Oceanographer Emergency Response Division NOAA/NOS/OR&R(206) 526-6959 voice 7600 Sand Point Way NE (206) 526-6329 fax Seattle, WA 98115 (206) 526-6317 main reception chris.bar...@noaa.gov _

Re: [Python-Dev] Informal educator feedback on PEP 572 (was Re: 2018 Python Language Summit coverage, last part)

2018-06-23 Thread Ivan Pozdeev via Python-Dev
{1...4}} I teach secondary school children maths, and if there's a plain English natural language equivalent to list builder notation, neither I nor any of my students, nor any of the text books I've read, have noticed it. -- Regards, Ivan ____

Re: [Python-Dev] We now have C code coverage!

2018-06-23 Thread Ivan Pozdeev via Python-Dev
ge and not worry about it? AFAICS lcov is based on gcov which is GCC-specific. Paul ___________ Python-Dev mailing list Python-Dev@python.org https://mail.python.org/mailman/listinfo/python-dev Unsubscribe: https://mail.python.org/mailman/options/pytho

Re: [Python-Dev] Informal educator feedback on PEP 572 (was Re: 2018 Python Language Summit coverage, last part)

2018-06-24 Thread Ivan Pozdeev via Python-Dev
It's not saying "def" or "lambda", which obviously create functions. It's a 'for' loop wrapped inside a list display. What part of that says "hey, I'm a nested function"? So if there's an implicit function, with implicit declaration of a mag

Re: [Python-Dev] Informal educator feedback on PEP 572 (was Re: 2018 Python Language Summit coverage, last part)

2018-06-25 Thread Ivan Pozdeev via Python-Dev
table. Brief summary of reasons for disliking ":=": * Cryptic use of punctuation * Too much overlap in functionality with "=" * Asymmetry between first and subsequent uses of the bound value * Makes expressions cluttered and hard to read to my eyes -- Regards, Ivan ___

Re: [Python-Dev] Informal educator feedback on PEP 572 (was Re: 2018 Python Language Summit coverage, last part)

2018-06-25 Thread Ivan Pozdeev via Python-Dev
here, assignments do make sense. Effectively, it's equivalent to an additional line: seq = range(calculate_b() as bottom, calculate_t() as top) results = [calculate_r(bottom,r,top) for r in seq] So, I suggest to evaluate the "feeder" expression in a local scope but expressions tha

Re: [Python-Dev] Informal educator feedback on PEP 572 (was Re: 2018 Python Language Summit coverage, last part)

2018-06-26 Thread Ivan Pozdeev via Python-Dev
confusion for learners, and while that isn't the only consideration, it should be given due weight. _______ Python-Dev mailing list Python-Dev@python.org https://mail.python.org/mailman/listinfo/python-dev Unsubscribe: https://mail.python.org/mailma

Re: [Python-Dev] Informal educator feedback on PEP 572 (was Re: 2018 Python Language Summit coverage, last part)

2018-06-26 Thread Ivan Pozdeev via Python-Dev
place, and even they struggle is there were multiple. A discussion long past, and a discussion yet to come. There are no beginnings or endings in the Wheel of Python... -- Regards, Ivan ___ Python-Dev mailing list Python-Dev@python.org

Re: [Python-Dev] Policy on refactoring/clean up

2018-06-26 Thread Ivan Pozdeev via Python-Dev
uot;. You may suggest it as a supplemental PR to PEP 580. Or even a part of it, but since the changes are controversial, better make the refactorings into separate commits so they can be rolled back separately if needed. Jeroen. _______ Python-Dev

Re: [Python-Dev] Policy on refactoring/clean up

2018-06-26 Thread Ivan Pozdeev via Python-Dev
On 26.06.2018 14:43, Jeroen Demeyer wrote: On 2018-06-26 13:11, Ivan Pozdeev via Python-Dev wrote: AFAICS, your PR is not a strict improvement What does "strict improvement" even mean? Many changes are not strict improvements, but still useful to have. Inada pointed me to YAG

Re: [Python-Dev] Policy on refactoring/clean up

2018-06-26 Thread Ivan Pozdeev via Python-Dev
On 26.06.2018 14:54, INADA Naoki wrote: On Tue, Jun 26, 2018 at 8:46 PM Jeroen Demeyer <mailto:j.deme...@ugent.be>> wrote: On 2018-06-26 13:11, Ivan Pozdeev via Python-Dev wrote: > AFAICS, your PR is not a strict improvement What does "strict improvement" e

Re: [Python-Dev] Policy on refactoring/clean up

2018-06-26 Thread Ivan Pozdeev via Python-Dev
On 26.06.2018 14:54, Ivan Pozdeev via Python-Dev wrote: On 26.06.2018 14:43, Jeroen Demeyer wrote: On 2018-06-26 13:11, Ivan Pozdeev via Python-Dev wrote: AFAICS, your PR is not a strict improvement What does "strict improvement" even mean? Many changes are not strict improve

Re: [Python-Dev] Informal educator feedback on PEP 572 (was Re: 2018 Python Language Summit coverage, last part)

2018-06-27 Thread Ivan Pozdeev via Python-Dev
On 26.06.2018 1:34, Greg Ewing wrote: Ivan Pozdeev via Python-Dev wrote: "as" was suggested even before is became a keyword in `with'. ( if (re.match(regex,line) as m) is not None: ) That's not equivalent where/given, though, since it still has the asymmetry problem.

Re: [Python-Dev] Informal educator feedback on PEP 572 (was Re: 2018 Python Language Summit coverage, last part)

2018-06-27 Thread Ivan Pozdeev via Python-Dev
er (b)). For me personally, (b) makes the PEP more consistent, so I'm not in favor of breaking up the PEP. But we can certainly break up the discussion -- that's why I started using the labels (a) and (b). -- [1] Sometimes it's an implicit global instead of an implicit nonlo

Re: [Python-Dev] Informal educator feedback on PEP 572 (was Re: 2018 Python Language Summit coverage, last part)

2018-06-27 Thread Ivan Pozdeev via Python-Dev
On 27.06.2018 16:25, Greg Ewing wrote: Ivan Pozdeev via Python-Dev wrote: Using this assigned result elsewhere in the same expression (akin to regex backreferences) is not a part of the basic idea actually. If that's true, then the proposal has mutated into something that has *no* ov

Re: [Python-Dev] Informal educator feedback on PEP 572 (was Re: 2018 Python Language Summit coverage, last part)

2018-06-27 Thread Ivan Pozdeev via Python-Dev
dity that different bits of a comprehension run in different scopes (unless we go out of our way to use locals()); merely using assignment expressions will just work consistently and simply, and loop variables will still be confined to the comprehension as they are now. -- Regards, Ivan ___

Re: [Python-Dev] Informal educator feedback on PEP 572 (was Re: 2018 Python Language Summit coverage, last part)

2018-06-27 Thread Ivan Pozdeev via Python-Dev
On 28.06.2018 1:42, Steven D'Aprano wrote: On Wed, Jun 27, 2018 at 05:52:16PM +0300, Ivan Pozdeev via Python-Dev wrote: What this means in practice is that assignments will go to different scopes depending on *where* they are in the comprehension: [ expr for x in iter1 for y in

Re: [Python-Dev] Informal educator feedback on PEP 572 (was Re: 2018 Python Language Summit coverage, last part)

2018-06-27 Thread Ivan Pozdeev via Python-Dev
On 28.06.2018 2:31, Ivan Pozdeev via Python-Dev wrote: On 28.06.2018 1:42, Steven D'Aprano wrote: On Wed, Jun 27, 2018 at 05:52:16PM +0300, Ivan Pozdeev via Python-Dev wrote: What this means in practice is that assignments will go to different scopes depending on *where* they are i

Re: [Python-Dev] Enable access to the AST for Python code

2015-05-21 Thread Peter Ludemann via Python-Dev
; As a simple example, a "macro" with access to the AST could decide to not evaluate something, whereas normal Python rules would be to evaluate (similar to wrapping with LISP QUOTE or LAMBDA). This would make PEP484 simpler (e.g., no need for special handling of "forward"

[Python-Dev] Python automatic optimization

2015-07-23 Thread Andrew Steinberg via Python-Dev
you,Andrew___ Python-Dev mailing list Python-Dev@python.org https://mail.python.org/mailman/listinfo/python-dev Unsubscribe: https://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com

Re: [Python-Dev] PEP-498: Literal String Formatting

2015-08-09 Thread Peter Ludemann via Python-Dev
o about stuff). > > I think it has to do with the nature of the programs that people write. > I write software for internal use in a large company. In the last 13 > years there, I've written literally hundreds of individual programs, > large and small. I just checked: literal

Re: [Python-Dev] PEP-498: Literal String Formatting

2015-08-09 Thread Peter Ludemann via Python-Dev
])) On 9 August 2015 at 15:25, Brett Cannon wrote: > > On Sun, Aug 9, 2015, 13:51 Peter Ludemann via Python-Dev < > python-dev@python.org> wrote: > > Most of my outputs are log messages, so this proposal won't help me > because (I presume) it does eager evaluation of

Re: [Python-Dev] PEP-498 & PEP-501: Literal String Formatting/Interpolation

2015-08-16 Thread Peter Ludemann via Python-Dev
Aug 9, 2015 at 3:25 PM Brett Cannon wrote: > >> >> On Sun, Aug 9, 2015, 13:51 Peter Ludemann via Python-Dev < >> python-dev@python.org> wrote: >> >> Most of my outputs are log messages, so this proposal won't help me >> because (I presume) it doe

Re: [Python-Dev] type(obj) vs. obj.__class__

2015-10-18 Thread Peter Ludemann via Python-Dev
e concrete guidelines about >> > when to use type(obj) vs. obj.__class__? If so, what would those be? >> > It may also be helpful to enumerate use cases for "type(obj) is not >> > obj.__class__". >> >> I for one would like to see a definitive explanat

Re: [Python-Dev] type(obj) vs. obj.__class__

2015-10-18 Thread Peter Ludemann via Python-Dev
ever way, for the same performance, to demonstrate that there's no need to assign to __class__. collections.deque is about 5x faster. (My simple benchmark tests the cost of x.append(i)) - p​ > > ChrisA > ___ > Python-Dev mailing list &g

[Python-Dev] "python.exe is not a valid Win32 app"

2015-12-01 Thread Alexei Belenki via Python-Dev
Installed python 3.5 (from https://www.python.org/downloads/) on Windows XPsp3/32 On starting >>python.exe got the text above in the Windows message box. Any suggestions?Thanks.AB___ Python-Dev mailing list Python-Dev@python.org https://mail.pyth

Re: [Python-Dev] Deleting with setting C API functions

2015-12-02 Thread Andrew Barnert via Python-Dev
d then decide that the next release is big enough to be worthy of 5.0. Or go from 3.9 to 2022, or XP, or Python Enterprise Python 1. :) _______ Python-Dev mailing list Python-Dev@python.org https://mail.python.org/mailman/listinfo/python-dev Unsubscribe: https://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com

Re: [Python-Dev] Python Language Reference has no mention of list comÃprehensions

2015-12-03 Thread Andrew Barnert via Python-Dev
atical terms are "extension" and "intention", but I get the feeling nobody would go for that. Ultimately, the best we have is "displays that aren't comprehensions" or "constructions that aren't comprehensions". Which means that something like &qu

Re: [Python-Dev] Python Language Reference has no mention of list comÃprehensions

2015-12-03 Thread Andrew Barnert via Python-Dev
On Dec 3, 2015, at 17:25, Steven D'Aprano wrote: > > On Thu, Dec 03, 2015 at 09:25:53AM -0800, Andrew Barnert via Python-Dev wrote: >>> On Dec 3, 2015, at 08:15, MRAB wrote: >>> >>>>> On 2015-12-03 15:09, Random832 wrote: >>>>> On 201

Re: [Python-Dev] Python Language Reference has no mention of list comÃprehensions

2015-12-04 Thread Andrew Barnert via Python-Dev
On Dec 4, 2015, at 00:38, Nick Coghlan wrote: > > On 4 December 2015 at 12:48, Andrew Barnert via Python-Dev > wrote: >> On Dec 3, 2015, at 17:25, Steven D'Aprano wrote: >>>> On Thu, Dec 03, 2015 at 09:25:53AM -0800, Andrew Barnert via Python-Dev >>>&

Re: [Python-Dev] A function for Find-Replace in lists

2015-12-09 Thread Andrew Barnert via Python-Dev
gt; http://stackoverflow.com/questions/34174643/python-find-replace-on-lists > > > Thanks ___ Python-Dev mailing list Python-Dev@python.org https://mail.python.org/mailman/listinfo/python-dev Unsubscribe: https://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com

Re: [Python-Dev] async/await behavior on multiple calls

2015-12-15 Thread Andrew Barnert via Python-Dev
ce impact for code that works with raw coroutines and doesn't need real futures to get them wrapped in futures anyway? _______ Python-Dev mailing list Python-Dev@python.org https://mail.python.org/mailman/listinfo/python-dev Unsubscribe: https://

Re: [Python-Dev] async/await behavior on multiple calls

2015-12-16 Thread Andrew Barnert via Python-Dev
am language to adopt awaitables built on top of native, user-visible coroutines, so it has to answer a few questions that C# dodged--like what happens when you await the same coroutine multiple times. That's not a negative judgment on Python, it's just a natural consequence of Python being a little more powerful here than the language it's borrowing from. Refusing to look at the differences between Python and C# would mean not noticing that and leaving it for some future language to solve instead of letting future languages copy from Python (which is always the best way to be consistent with everyone else, of course). ___ Python-Dev mailing list Python-Dev@python.org https://mail.python.org/mailman/listinfo/python-dev Unsubscribe: https://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com

Re: [Python-Dev] Idea: Dictionary references

2015-12-17 Thread Andrew Barnert via Python-Dev
k this is strictly an > improvement, except perhaps in memory. Guards would also have an issue > with nested scopes. You have a note on your website about it: > (https://faster-cpython.readthedocs.org/fat_python.html#call-pure-builtins) _________

Re: [Python-Dev] Idea: Dictionary references

2015-12-17 Thread Andrew Barnert via Python-Dev
oesn't make sense. Maybe someone who's better at explaining than me can come up with something clearer than the existing documentation, but I can't. ___________ Python-Dev mailing list Python-Dev@python.org https://mail.python.org/mailma

Re: [Python-Dev] Idea: Dictionary references

2015-12-17 Thread Andrew Barnert via Python-Dev
On Dec 17, 2015, at 13:37, Andrew Barnert via Python-Dev wrote: > > On Thursday, December 17, 2015 11:19 AM, Franklin? Lee > wrote: > > >> ... >> as soon as I figure out how descriptors actually work... > > > I think you need to learn what LOAD_ATTR

Re: [Python-Dev] Idea: Dictionary references

2015-12-17 Thread Andrew Barnert via Python-Dev
the descriptor call, you can cache the descriptor itself but it will rarely help, and the builtin method cache probably already takes care of 99% of the cases where it would help, so I don't see what you're going to get here. >> On Thu, Dec 17, 2015 at 5:17 PM, Andrew Barnert w

Re: [Python-Dev] Idea: Dictionary references

2015-12-18 Thread Andrew Barnert via Python-Dev
> On Dec 18, 2015, at 04:56, Steven D'Aprano wrote: > >>> On Thu, Dec 17, 2015 at 09:30:24AM -0800, Andrew Barnert via Python-Dev >>> wrote: >>> On Dec 17, 2015, at 07:38, Franklin? Lee >>> wrote: >>> >>> The nested dicti

Re: [Python-Dev] Asynchronous context manager in a typical network server

2015-12-18 Thread Andrew Barnert via Python-Dev
a new patch release for Python instead of for every separate server written in Python is probably a bit nicer. :) ___ Python-Dev mailing list Python-Dev@python.org https://mail.python.org/mailman/listinfo/python-dev Unsubscribe: https://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com

Re: [Python-Dev] Asynchronous context manager in a typical network server

2015-12-18 Thread Andrew Barnert via Python-Dev
rs. It's 11 days. Which is pretty reasonable server uptime. And probably just outside the longest test you're ever going to run. I don't trust myself to pick "a big number" when the numbers get this big. But I still sometimes sneak one past myself somehow. Hence my sugg

Re: [Python-Dev] Asynchronous context manager in a typical network server

2015-12-18 Thread Andrew Barnert via Python-Dev
per on top of a Future made to look more like threading.Event in its API.) OK, I thought the OP's code looked pretty clear as written: he wants to wait until cancelled, so he waits on something that pretty clearly won't ever finish until he's cancelled. If that (or an Event or whatever

Re: [Python-Dev] Change the repr for datetime.timedelta (was Re: Asynchronous context manager in a typical network server)

2015-12-21 Thread Andrew Barnert via Python-Dev
.c (and various other things in the stdlib) not being (completely) argclinicified? Or is there something hairy about this type (and various other things in the stdlib) that makes them still useless even with argclinic? _______ Python-Dev mailing list Python

Re: [Python-Dev] PEP 257 and __init__

2015-12-29 Thread Andrew Barnert via Python-Dev
more experienced in other languages and whose instinctive "taste" isn't sufficiently Pythonic. And for that use case, keeping the rules as simple as possible is probably helpful. Better to have one wasted line in every file than to have an extra rule that all those JS developers ha

Re: [Python-Dev] PEP 257 and __init__

2015-12-29 Thread Andrew Barnert via Python-Dev
conventions of scientific/numerical programming and Django programming, so presumably coming up with your own configuration shouldn't be too hard--don't require docstrings on __init__, or on all special methods, or only when there no __new__, or whatever.)

Re: [Python-Dev] bitwise operations for bytes and bytearray

2016-01-07 Thread Andrew Barnert via Python-Dev
e needs patch stage, which makes it perfect for the OP: in addition to learning how to hack on builtin types, he can also learn the other parts of the dev process. (Even if the bug is eventually rejected, as seems likely given that it sat around for three years with no compelling use case and t

Re: [Python-Dev] bitwise operations for bytes and bytearray

2016-01-09 Thread Andrew Barnert via Python-Dev
s like there's not much support for the idea, but I think that's at least partly because people want to see realistic use cases (that aren't server better by the existing bitarray/bitstring/etc. modules on PyPI, or using a NumPy array, or just using ints, etc.). >> On F

Re: [Python-Dev] PEP 509: Add a private version to dict

2016-01-11 Thread Andrew Barnert via Python-Dev
't? If so, that seems reasonable. (The worst case in incrementing the version unnecessarily is that you miss an optimization that would have been safe, right?). ___________ Python-Dev mailing list Python-Dev@python.org https://mail.python.org/mailman/listinfo/python-dev Unsubscribe: https://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com

Re: [Python-Dev] Discussion related to memory leaks requested

2016-01-13 Thread Andrew Barnert via Python-Dev
using Python in >>> an embedded configuration. >> Hum, did you try tracemalloc? >> >> https://docs.python.org/dev/library/tracemalloc.html >> https://pytracemalloc.readthedocs.org/ >> >>> Is there someone in the group that would like to discuss this

[Python-Dev] Should inspect.getargspec take any callable?

2016-01-16 Thread Aviv Cohn via Python-Dev
n whether `func` is a function, a class or a callable object, and pass into `getargs` the appropriate value. What is your opinion?Thank you___ Python-Dev mailing list Python-Dev@python.org https://mail.python.org/mailman/listinfo/python-dev Unsubscribe: https://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com

Re: [Python-Dev] Should inspect.getargspec take any callable?

2016-01-16 Thread Andrew Barnert via Python-Dev
On Jan 16, 2016, at 08:05, Aviv Cohn via Python-Dev wrote: > > The `getargspec` function in the `inspect` module enforces the input > parameter to be either a method or a function. The `getargspec` already works with classes, callable objects, and some builtins. It's also

Re: [Python-Dev] Update PEP 7 to require curly braces in C

2016-01-18 Thread Andrew Barnert via Python-Dev
ode, even if it's a simpler change to the PEP. Is that what was intended?_______ Python-Dev mailing list Python-Dev@python.org https://mail.python.org/mailman/listinfo/python-dev Unsubscribe: https://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com

Re: [Python-Dev] Update PEP 7 to require curly braces in C

2016-01-18 Thread Peter Ludemann via Python-Dev
e list of styles here: https://en.wikipedia.org/wiki/Indent_style I'm sure that some of these have not been advocated in this thread.​ > > */arry* > > > _______ > Python-Dev mailing > listPython-Dev@python.orghttps://mail.p

Re: [Python-Dev] Update PEP 7 to require curly braces in C

2016-01-19 Thread Andrew Barnert via Python-Dev
or see your 2-line version in C, I use it quite a bit in C++ (and related languages like D), so it doesn't look at all weird to me. But I'll leave it up to people who only do C (and Python) and/or who are more familiar with the CPython code base to judge. _______

Re: [Python-Dev] Code formatter bot

2016-01-20 Thread Andrew Barnert via Python-Dev
o a human can decide, and so people can see the bug in the plugin or filter--than to automatically make changes that weren't wanted.) _______ Python-Dev mailing list Python-Dev@python.org https://mail.python.org/mailman/listinfo/python-dev Unsubscribe: https://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com

Re: [Python-Dev] PEP 509: Add a private version to dict

2016-01-20 Thread Andrew Barnert via Python-Dev
ementation _can_ be a single global counter, if that turns out to be most efficient, but can also be a counter per dictionary and a globally-unique ID per dictionary? ___________ Python-Dev mailing list Python-Dev@python.org https://mail.python.org/mailman

Re: [Python-Dev] FAT Python (lack of) performance

2016-01-25 Thread Andrew Barnert via Python-Dev
ion, or only with bytecode? I'm not sure how much benefit you'd get out of specializing list vs. generic iterable or int vs. whatever from an AST transform, but substituting raw C code, on the other hand... ___________ Python-Dev mailing list Pytho

Re: [Python-Dev] FAT Python (lack of) performance

2016-01-25 Thread Andrew Barnert via Python-Dev
d to see you already thought of that before me. :) _______ Python-Dev mailing list Python-Dev@python.org https://mail.python.org/mailman/listinfo/python-dev Unsubscribe: https://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com

Re: [Python-Dev] FAT Python (lack of) performance

2016-01-25 Thread Andrew Barnert via Python-Dev
es. ___________ Python-Dev mailing list Python-Dev@python.org https://mail.python.org/mailman/listinfo/python-dev Unsubscribe: https://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com

Re: [Python-Dev] FAT Python (lack of) performance

2016-01-25 Thread Andrew Barnert via Python-Dev
hat are almost always UCS-2 (about 110% slower on Python 2) than doing this kind of arithmetic (9% faster on Python 2), or cutting tomatoes (TypeError on both versions). ___________ Python-Dev mailing list Python-Dev@python.org https://mail.python.org/mailman/listinfo/python-dev Unsubscribe: https://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com

[Python-Dev] Hoping to Find a Mentor

2016-01-26 Thread Truong Nguyen via Python-Dev
om. I'm a hard worker and responsible person and do my best to contribute to the organization. Have a nice day, Truong Nguyen _______ Python-Dev mailing list Python-Dev@python.org https://mail.python.org/mailman/listinfo/python-dev Unsubscribe: http

Re: [Python-Dev] FAT Python (lack of) performance

2016-01-29 Thread Peter Ludemann via Python-Dev
l > discussion on motives for contributing to open source projects, and > the impact that has on what we can reasonably expect from fellow > contributors. > > Cheers, > Nick. > > -- > Nick Coghlan | ncogh...@gmail.com | Brisbane, Australia > ___________

Re: [Python-Dev] Opcode cache in ceval loop

2016-02-01 Thread Andrew Barnert via Python-Dev
; - some macro benchmarks are now 10-20% faster; 2to3 (a real application) is > 7-8% faster; > > - and I have some good insights on the memory footprint. > > ** The purpose of this email is to get a general approval from python-dev, so > that I ca

Re: [Python-Dev] More optimisation ideas

2016-02-01 Thread Andrew Barnert via Python-Dev
Python scripts without ever learning how to use the terminal or find their Python packages via Explorer/Finder. And meanwhile, other people would be asking why their app runs slower on one machine than another, because they didn't expect that installing python-dev on top of python would s

Re: [Python-Dev] More optimisation ideas

2016-02-01 Thread Andrew Barnert via Python-Dev
On Feb 1, 2016, at 19:44, Terry Reedy wrote: > >> On 2/1/2016 3:39 PM, Andrew Barnert via Python-Dev wrote: >> >> There are already multiple duplicate questions every month on >> StackOverflow from people asking "how do I find the source to stdlib >> modu

Re: [Python-Dev] Speeding up CPython 5-10%

2016-02-02 Thread Peter Ludemann via Python-Dev
ore a matter of whether you find >> it easier to design the JIT to deal with stack or register code. >> > > It seems like Yury thinks so. He didn't tell use so far. > > > Best, > Sven > > ___ > Python-Dev mailing list > Python-Dev@python.org

<    1   2   3   4   5   6   7   8   9   10   >