Re: [Python-ideas] Revisiting Immutable Mappings

2018-10-18 Thread Chris Barker via Python-ideas
t; > One could also imagine that isinstance and issubclass taking a keyword >> argument for the logical operator. Maybe just something as simple as >> "isinstance(foo, (a, b), all=True)" >> > > Does AND even make sense for isinstance/issubclass? > > Cheers, &g

Re: [Python-ideas] Contracts in python -- a report & next steps

2018-10-24 Thread Chris Barker via Python-ideas
59 voice 7600 Sand Point Way NE (206) 526-6329 fax Seattle, WA 98115 (206) 526-6317 main reception [email protected] ___ Python-ideas mailing list [email protected] https://mail.python.org/mailman/listinfo/python-ideas Code of Conduct: http://python.org/psf/codeofconduct/

Re: [Python-ideas] dict.setdefault_call(), or API variations thereupon

2018-11-02 Thread Chris Barker via Python-ideas
on use case. -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 [email protected] ___

Re: [Python-ideas] Add "default" kwarg to list.pop()

2018-11-02 Thread Chris Barker via Python-ideas
gency 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 [email protected] ___________ Python-ideas mailing list [email protected] h

Re: [Python-ideas] Serialization of CSV vs. JSON

2018-11-02 Thread Chris Barker via Python-ideas
apher 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 [email protected] ___________ Python-ideas mailing list Python-id

Re: [Python-ideas] dict.setdefault_call(), or API variations thereupon

2018-11-05 Thread Chris Barker via Python-ideas
ll > it delayed evaluation, and Python already has it, but only in certain > special syntactic forms: > > spam and > spam or > if condition else > > There are others: e.g. the body of functions, including lambda. But > functions are kinda heavyweight to

Re: [Python-ideas] Serialization of CSV vs. JSON

2018-11-05 Thread Chris Barker via Python-ideas
necessary to avoid having to try parsing every > string value as a date time (and to specify precision: "2018" is not the > same as "2018 00:00:01") > > On Friday, November 2, 2018, Chris Barker via Python-ideas < > [email protected]> wrote: >

Re: [Python-ideas] Using sha512 instead of md5 on python.org/downloads

2018-12-08 Thread Ronald Oussoren via Python-ideas
e’s also python itself that can be used to calculate the checksum :-) Ronald _______ Python-ideas mailing list [email protected] https://mail.python.org/mailman/listinfo/python-ideas Code of Conduct: http://python.org/psf/codeofconduct/

Re: [Python-ideas] Using sha512 instead of md5 on python.org/downloads

2018-12-09 Thread Ronald Oussoren via Python-ideas
ly assume that HTTPS downloads are reliable enough and don’t verify checksums unless I do the download in an automation pipeline. Ronald _______ Python-ideas mailing list [email protected] https://mail.python.org/mailman/listinfo/python-ideas Code o

Re: [Python-ideas] Suggested MapView object (Re: __len__() for map())

2018-12-10 Thread Chris Barker via Python-ideas
ng to imagine a use case for that, and I haven't. And I don't think that's the use case that started this thread... -CHB > _______ > Python-ideas mailing list > [email protected] > https://mail.python.org/mailma

Re: [Python-ideas] Using sha512 instead of md5 on python.org/downloads

2018-12-10 Thread Chris Barker via Python-ideas
On Sun, Dec 9, 2018 at 10:32 PM Ronald Oussoren via Python-ideas < [email protected]> wrote: > BTW. I wonder how many actually verify these checksums, > Hardly anyone -- most of us verify the download by trying to use it :-) Which doesn't mean that we shouldn't

Re: [Python-ideas] Suggested MapView object (Re: __len__() for map())

2018-12-11 Thread Chris Barker via Python-ideas
topher 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 [email protected] ___________ Python-ideas ma

[Python-ideas] Use lazy loading with hashtable in python gettext module

2018-12-18 Thread Serge Ballesta via Python-ideas
or lazy access Before going further, I would like to know whether implementing lazy access through the hash table that way seems to be a interesting improvement or a dead end. _______ Python-ideas mailing list [email protected] https://mail.python.org/ma

Re: [Python-ideas] Use lazy loading with hashtable in python gettext module

2018-12-18 Thread Serge Ballesta via Python-ideas
ry users choose according to their own use case. Serge _______ Python-ideas mailing list [email protected] https://mail.python.org/mailman/listinfo/python-ideas Code of Conduct: http://python.org/psf/codeofconduct/

Re: [Python-ideas] Use lazy loading with hashtable in python gettext module

2018-12-18 Thread Serge Ballesta via Python-ideas
Le 18/12/2018 à 23:09, Barry Scott a écrit : On 18 Dec 2018, at 09:10, Serge Ballesta via Python-ideas mailto:[email protected]>> wrote: In a project of mine, I have used the gettext module from Python Standard Library. I have found that several tools could be used to genera

Re: [Python-ideas] Use lazy loading with hashtable in python gettext module

2018-12-23 Thread Serge Ballesta via Python-ideas
low to implement the new feature with minimal refactoring for the gettext module. Le 18/12/2018 à 10:10, Serge Ballesta via Python-ideas a écrit : In a project of mine, I have used the gettext module from Python Standard Library. I have found that several tools could be used to generate the Mach

Re: [Python-ideas] Possible PEP regarding the use of the continue keyword in try/except blocks

2019-01-06 Thread Chris Barker via Python-ideas
ber of ways one might want to proceed with/without an error, and the current except, finally, else options cover them all in a clearly defined way. -CHB > > ~Amber > ___ > Python-ideas mailing list > [email protected] > https:/

[Python-ideas] Single line single expression try/except syntax

2019-01-27 Thread Alex Shafer via Python-ideas
� a_list[i] += 1 ��� etc() I realize this could be accomplished with context managers, but that seems like overkill to simply throw away the exception, and would increase the overall required code length. Thanks for your input! Alex signature.asc Description: OpenPGP digital signature

Re: [Python-ideas] Add list.join() please

2019-01-29 Thread Chris Barker via Python-ideas
h.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 [email protected] ___ Python-ideas mailing list [email protected] https://mail.python.org/mailman/listinfo/python-ideas Code of Conduct: http://python.org/psf/codeofconduct/

Re: [Python-ideas] Add list.join() please

2019-01-29 Thread Alex Shafer via Python-ideas
about composable, re-usable general > purpose components more than special cases. > > -- > Steve > _______ > Python-ideas mailing list > [email protected] > https://mail.python.org/mailman/listinfo/python-ideas > Code of Conduct: http://python.or

Re: [Python-ideas] Add list.join() please

2019-01-29 Thread Alex Shafer via Python-ideas
ify = lambda it: type(it)(map(str, it)) > > Done! Does that really need to be in the STDLIB? > > On Tue, Jan 29, 2019, 7:11 PM Alex Shafer via Python-ideas > >> 1) I'm in favor of adding a stringify method to all collections >> >> 2) strings are special and worthy

Re: [Python-ideas] Add list.join() please

2019-01-29 Thread Alex Shafer via Python-ideas
type(it)(map(str, it)) >>> >>> Done! Does that really need to be in the STDLIB? >>> >>> On Tue, Jan 29, 2019, 7:11 PM Alex Shafer via Python-ideas >>> >> >>>> 1) I'm in favor of adding a stringify method to

Re: [Python-ideas] Stack traces ought to flag when a module has been changed on disk

2019-01-30 Thread Chris Barker via Python-ideas
- 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 [email protected] _________

Re: [Python-ideas] Add list.join() please

2019-01-31 Thread Chris Barker via Python-ideas
it's an idea. -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 [email protected] ______

Re: [Python-ideas] Clearer communication

2019-02-01 Thread Alex Shafer via Python-ideas
anyone be opposed to the creation of a #python-ideas on a large IRC network? I'd hope discussions there can have the same weight, merit, community involvement, and potential for PEP-tracking ideas. I think accommodating different people's best communication modes is essential to the

Re: [Python-ideas] Vectorization [was Re: Add list.join() please]

2019-02-03 Thread Ronald Oussoren via Python-ideas
rator is a good idea in the first place). Ronald ___________ Python-ideas mailing list [email protected] https://mail.python.org/mailman/listinfo/python-ideas Code of Conduct: http://python.org/psf/codeofconduct/

Re: [Python-ideas] Vectorization [was Re: Add list.join() please]

2019-02-03 Thread Ronald Oussoren via Python-ideas
useful for libraries like NumPy that already support the @ operator for matrix multiplication. Using @ both for matrix multiplication and element-wise application could be made to work, but would be very confusing. Ronald — Twitter: @ronaldoussoren Blog: https://blog.ronaldoussoren.net/__

[Python-ideas] About PEP-582

2019-02-19 Thread Philip Bergen via Python-ideas
hilip Bergen* P: +1(415)200-7340 *"Without data you are just another person with an opinion" -- W. Edwards Deming* _______ Python-ideas mailing list [email protected] https://mail.python.org/mailman/listinfo/python-ideas Code of Conduct: http:/

Re: [Python-ideas] PEP 8 update on line length

2019-02-21 Thread Chris Barker via Python-ideas
nalysis that somehow that is optimum for readability. -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...@

Re: [Python-ideas] PEP 8 update on line length

2019-02-21 Thread Philip Bergen via Python-ideas
Feb 21, 2019 at 3:20 PM wrote: > Send Python-ideas mailing list submissions to > [email protected] > > To subscribe or unsubscribe via the World Wide Web, visit > https://mail.python.org/mailman/listinfo/python-ideas > or, via email, send a message with subje

Re: [Python-ideas] PEP 8 update on line length

2019-02-23 Thread Alexandre Dubois via Python-ideas
xandre Dubois --- L'absence de virus dans ce courrier électronique a été vérifiée par le logiciel antivirus Avast. https://www.avast.com/antivirus ___________ Python-ideas mailing list [email protected] https://mail.python.org/mailman/listinfo

Re: [Python-ideas] PEP 8 update on line length

2019-02-27 Thread Chris Barker via Python-ideas
600 Sand Point Way NE (206) 526-6329 fax Seattle, WA 98115 (206) 526-6317 main reception [email protected] _______ Python-ideas mailing list [email protected] https://mail.python.org/mailman/listinfo/python-ideas Code of Conduct: http://python.org/psf/codeofconduct/

Re: [Python-ideas] Problems (and solutions?) in writing decorators

2019-03-12 Thread Sylvain MARIE via Python-ideas
raps` that is truly signature-preserving (based on the same recipe than `decorator`). Once again, any feedback would be gladly appreciated ! Kind regards Sylvain -Message d'origine----- De : Python-ideas De la part de Greg Ewing Envoyé : vendredi 26 octobre 2018 00:04 À : python-id

Re: [Python-ideas] Problems (and solutions?) in writing decorators

2019-03-12 Thread Sylvain MARIE via Python-ideas
ined in the doc. Did I answer your questions ? Thanks again for the quick feedback ! Best, Sylvain -Message d'origine- De : Python-ideas De la part de Steven D'Aprano Envoyé : mardi 12 mars 2019 12:30 À : [email protected] Objet : Re: [Python-ideas] Problems (and solutions?

Re: [Python-ideas] Problems (and solutions?) in writing decorators

2019-03-12 Thread Sylvain MARIE via Python-ideas
2019 14:53 À : Steven D'Aprano ; [email protected]; David Mertz Objet : RE: [Python-ideas] Problems (and solutions?) in writing decorators David, Steven, Thanks for your interest ! As you probably know, decorators and function wrappers are *completely different concepts*. A decorat

Re: [Python-ideas] Problems (and solutions?) in writing decorators

2019-03-12 Thread Sylvain MARIE via Python-ideas
on-existent need ;) Kind regards -- Sylvain De : David Mertz Envoyé : mardi 12 mars 2019 15:30 À : Sylvain MARIE Cc : Steven D'Aprano ; python-ideas Objet : Re: [Python-ideas] Problems (and solutions?) in writing decorators [External email: Use caution with links and attachments] ___

Re: [Python-ideas] PEP: Dict addition and subtraction

2019-03-12 Thread Chris Barker via Python-ideas
(206) 526-6959 voice 7600 Sand Point Way NE (206) 526-6329 fax Seattle, WA 98115 (206) 526-6317 main reception [email protected] _______ Python-ideas mailing list [email protected] https://mail.python.org/mailman/listinfo/python-idea

Re: [Python-ideas] Problems (and solutions?) in writing decorators

2019-03-14 Thread Sylvain MARIE via Python-ideas
ds Sylvain De : David Mertz Envoyé : mardi 12 mars 2019 19:15 À : Sylvain MARIE Cc : Steven D'Aprano ; python-ideas Objet : Re: [Python-ideas] Problems (and solutions?) in writing decorators [External email: Use caution with links and attachments] One of

Re: [Python-ideas] Problems (and solutions?) in writing decorators

2019-03-19 Thread Sylvain MARIE via Python-ideas
2019 04:56 À : Sylvain MARIE Cc : David Mertz ; python-ideas Objet : Re: [Python-ideas] Problems (and solutions?) in writing decorators [External email: Use caution with links and attachments] ____ Sylvain MARIE via Python-ideas writes: > I totally und

Re: [Python-ideas] Problems (and solutions?) in writing decorators

2019-03-20 Thread Sylvain MARIE via Python-ideas
just there to give feedback from what I see of the python libs development community. -- Sylvain De : Python-ideas De la part de Christopher Barker Envoyé : mercredi 20 mars 2019 06:50 À : Greg Ewing Cc : python-ideas Objet : Re: [Python-ideas] Problems (and solutions?) in writing decorator

[Python-ideas] Re: Comparison operator support (>= and <=) for type

2019-06-17 Thread Andrew Barnert via Python-ideas
impler to think about, and the confusion almost never comes up and isn’t that hard to deal with when it does. It goes along with, e.g., types being their own constructor functions. And if lists can contain themselves, and so can sets (you have to subclass set or frozenset, but the res

[Python-ideas] Re: Comparison operator support (>= and <=) for type

2019-06-17 Thread Andrew Barnert via Python-ideas
eds > to be changed it should *not* be to introduce <= for types. I agree that <= is not as good a spelling as <: for subclass. But I don’t think it’s that bad; it’s more than good enough for the rare cases where someone needs so much type comparison that they need operators. Especially

[Python-ideas] Re: Operator as first class citizens -- like in scala -- or yet another new operator?

2019-06-19 Thread Andrew Barnert via Python-ideas
assigning to, a local variable named “foo” is not an operation on “the foo variable”, because there is no such thing; it’s an operation on the locals namespace._______ Python-ideas mailing list -- [email protected] To unsubscribe send an email to py

[Python-ideas] Overloading assignment concrete proposal (Re: Re: Operator as first class citizens -- like in scala -- or yet another new operator?)

2019-06-19 Thread Andrew Barnert via Python-ideas
implementation, there wouldn't even be such a temporary variable (in CPython, the values would just be pushed on the stack), but for documenting the behavior, teaching it to students, etc., that doesn't matter. Being precise here wouldn't be hugely difficult, but it is a little more d

[Python-ideas] Re: Why not accept lists or arbitrary iterables in str.endswith?

2019-06-19 Thread Andrew Barnert via Python-ideas
ging them today either, but maybe you could make a case otherwise. _______ Python-ideas mailing list -- [email protected] To unsubscribe send an email to [email protected] https://mail.python.org/mailman3/lists/python-ideas.python.org/ Message archived at https://mail.python.org/archives/list

[Python-ideas] Re: Overloading assignment concrete proposal (Re: Re: Operator as first class citizens -- like in scala -- or yet another new operator?)

2019-06-19 Thread Andrew Barnert via Python-ideas
On Jun 19, 2019, at 16:57, Chris Angelico wrote: > > On Thu, Jun 20, 2019 at 8:14 AM Andrew Barnert via Python-ideas > wrote: >> … x = y would mean this: >> >>try: >>xval = globals()['x'] >>result = xval.__iassig

[Python-ideas] Re: Overloading assignment concrete proposal (Re: Re: Operator as first class citizens -- like in scala -- or yet another new operator?)

2019-06-19 Thread Andrew Barnert via Python-ideas
On Jun 19, 2019, at 17:25, Andrew Barnert wrote: > > At least with CPython, I’m 99% sure… I forgot that I have Pythonista on my phone so I can check it instead of guessing. Make that 100% sure. :) ___ Python-ideas mailing list -- python

[Python-ideas] Re: Canceling thread in python

2019-06-20 Thread Andrew Barnert via Python-ideas
pposed to threads where things are broken except in special conditions. _______ Python-ideas mailing list -- [email protected] To unsubscribe send an email to [email protected] https://mail.python.org/mailman3/lists/python-ideas.pyth

[Python-ideas] Re: Overloading assignment concrete proposal (Re: Re: Operator as first class citizens -- like in scala -- or yet another new operator?)

2019-06-21 Thread Andrew Barnert via Python-ideas
er the __iadd__(y)? I’m not entirely sure what the right answer is for all of these situations. And that might depend on how you describe this protocol in the docs (the name “setself” doesn’t necessarily imply the same thing as “overloading assignment”).__________

[Python-ideas] Re: Overloading assignment concrete proposal (Re: Re: Operator as first class citizens -- like in scala -- or yet another new operator?)

2019-06-21 Thread Andrew Barnert via Python-ideas
line 1, in >> > AttributeError: 'Foo' object has no attribute 'v' >> >> > --> f = "hello world" >> > --> print(f.v) >> > hello world >> >> > --> print(f) >> > <__main__.Foo object at 0x7

[Python-ideas] Re: Python-ideas] Re: `if-unless` expressions in Python

2019-06-23 Thread Andrew Barnert via Python-ideas
___ Python-ideas mailing list -- [email protected] To unsubscribe send an email to [email protected] https://mail.python.org/mailman3/lists/python-ideas.python.org/ Message archived at https://mail.python.org/archives/list/[email protected]/message/IOLSWAT576CBEMBF

[Python-ideas] Re: Make $ a valid identifier and a singleton

2019-06-23 Thread Andrew Barnert via Python-ideas
a "rpartial" function, and the second by > using ellipsis ... as a placeholder, or a named constant in the > functools module. I’m pretty sure there are multiple improved-partial projects on PyPI. Maybe just picking out one and adding a link to it from the functools docs is sufficien

[Python-ideas] Re: `if-unless` expressions in Python

2019-06-23 Thread Andrew Barnert via Python-ideas
ban starred items and keyword arguments if they fall naturally out of the change, but no reason to go out of the way to add them if they don’t. The semantics should be pretty obvious to any reader, but there’s also an existing simple way to write it (*pass clearly should do the same thing as *(), ins

[Python-ideas] Re: `if-unless` expressions in Python

2019-06-24 Thread Andrew Barnert via Python-ideas
because "2 if spam else pass" is a valid pass_expression, and therefore a valid starred_item, and therefore the whole list is a valid starred_list (which, at runtime, will be either (1, 3) or (1, 2, 3)), and therefore the statement is valid. I'm not sure how many nodes are in that &qu

[Python-ideas] Re: `if-unless` expressions in Python

2019-06-24 Thread Andrew Barnert via Python-ideas
still haven’t seen an example of a function call or list display that actually looks compelling. I think if anyone wants to convince everyone that some form of this proposal is worthwhile, that’s the first thing they need to provide. _______ Python-ideas m

[Python-ideas] Re: A proposal (and implementation) to add assignment and LOAD overloading (was: (Re: Re: Overloading assignment concrete proposal (Re: Re: Operator as first class citizens -- like in s

2019-06-25 Thread Andrew Barnert via Python-ideas
custom modules, etc.), type doing the wrong thing, and so on? _______ Python-ideas mailing list -- [email protected] To unsubscribe send an email to [email protected] https://mail.python.org/mailman3/lists/python-ideas.python.org/ Message ar

[Python-ideas] Re: A proposal (and implementation) to add assignment and LOAD overloading

2019-06-26 Thread Andrew Barnert via Python-ideas
actually can be understood, it just can’t prevent Humpty from misusing it. ___________ Python-ideas mailing list -- [email protected] To unsubscribe send an email to [email protected] https://mail.python.org/mailman3/lists/python-id

[Python-ideas] Re: A proposal (and implementation) to add assignment and LOAD overloading

2019-06-26 Thread Andrew Barnert via Python-ideas
tus, or referencing f->eggs in code that doesn't even run… so let's not worry about bulletproofing it.) _______ Python-ideas mailing list -- [email protected] To unsubscribe send an email to [email protected] https://mail.python.org/mailman3/lists

[Python-ideas] Re: A proposal (and implementation) to add assignment and LOAD overloading

2019-06-26 Thread Andrew Barnert via Python-ideas
sing that variable will trigger another call to __getself__. I assume Nate is working on an answer to that along with all the other points that have been raised. _______ Python-ideas mailing list -- [email protected] To unsubscribe send an email to python

[Python-ideas] Re: Proposal: Using % sign for percentage

2019-06-26 Thread Andrew Barnert via Python-ideas
tually can disambiguate cases like this without exponential backtracking.) _______ Python-ideas mailing list -- [email protected] To unsubscribe send an email to [email protected] https://mail.python.org/mailman3/lists/python-ideas.python.org/ Message archived

[Python-ideas] Re: A proposal (and implementation) to add assignment and LOAD overloading

2019-06-26 Thread Andrew Barnert via Python-ideas
e namespace semantics, so you’re prepared for that.) _______ Python-ideas mailing list -- [email protected] To unsubscribe send an email to [email protected] https://mail.python.org/mailman3/lists/python-ideas.python.org/ Mess

[Python-ideas] Re: A proposal (and implementation) to add assignment and LOAD overloading

2019-06-26 Thread Andrew Barnert via Python-ideas
that it’s way too slow. Unless you’ve got a better way to make this efficient enough, that’s exactly why I need this feature.” _______ Python-ideas mailing list -- [email protected] To unsubscribe send an email to [email protected] https://mail

[Python-ideas] Re: A proposal (and implementation) to add assignment and LOAD overloading

2019-06-27 Thread Andrew Barnert via Python-ideas
ut doing anything in between, what if, say, x.__getself__() raises? _______ Python-ideas mailing list -- [email protected] To unsubscribe send an email to [email protected] https://mail.python.org/mailman3/lists/python-ideas.python.org/ Message archived at ht

[Python-ideas] Re: Canceling thread in python

2019-06-27 Thread Andrew Barnert via Python-ideas
thread cancellation state and type and cleanup functions. _______ Python-ideas mailing list -- [email protected] To unsubscribe send an email to [email protected] https://mail.python.org/mailman3/lists/python-ideas.python.org/ Message archived at https://mai

[Python-ideas] Re: Canceling thread in python

2019-06-27 Thread Andrew Barnert via Python-ideas
elf._trace)        super().run(*args, **kw)    def throw(self, e):        self._e = e You wouldn't want to do this in practice, but for playing with the API to see if it feels right/usable, it should be fine. ___________ Python-ideas mailing list -- pyth

[Python-ideas] Re: A proposal (and implementation) to add assignment and LOAD overloading

2019-06-27 Thread Andrew Barnert via Python-ideas
arly as possible, which is what allows you to think of globals as local to global code. ___ Python-ideas mailing list -- [email protected] To unsubscribe send an email to [email protected] https://mail.python.org/mailman3/lists/pyt

[Python-ideas] Re: something like sscanf for Python

2019-06-28 Thread Andrew Barnert via Python-ideas
seful than a function which is like C scanf with a few differences and a few extensions (that aren’t the same extensions as, say, ObjC). Although I suppose there’s no reason you couldn’t do both. _______ Python-ideas mailing list -- [email protected] T

[Python-ideas] Re: something like sscanf for Python

2019-06-28 Thread Andrew Barnert via Python-ideas
ople have been trying to improve on scanf for 40 years, and the only things that have caught on look nothing like it (regex, or just not having a format string at all and doing something like C++ >> operator). ___________ Python-ideas mailing list -- py

[Python-ideas] Re: Proposal: `python-config` should be available in venv virtual environment.

2019-07-03 Thread Andrew Barnert via Python-ideas
was a reason they did it that way? _______ Python-ideas mailing list -- [email protected] To unsubscribe send an email to [email protected] https://mail.python.org/mailman3/lists/python-ideas.python.org/ Message archived at https://mail.python.org/archives/li

[Python-ideas] Getting the version number for a package or module, reliably

2019-07-06 Thread Sylvain MARIE via Python-ideas
know so that I can cite it in the documentation and even redirect to it if it happens to already cover all the cases. Happy summer to all ! -- Sylvain ___ Python-ideas mailing list -- [email protected] To unsubscribe send an email to python-ideas-le

[Python-ideas] Re: Getting the version number for a package or module, reliably

2019-07-06 Thread Sylvain MARIE via Python-ideas
like it too much when the object to deserialize does not correspond to the same versions of the classes used. Best Sylvain De : Xavier Combelle Envoyé : samedi 6 juillet 2019 11:34 À : Sylvain MARIE Objet : Re: [Python-ideas] Getting the version number for a package or module, reliably

[Python-ideas] Re: Shouldn't this: ' myVar: "value" ' be a syntax error ?

2019-07-09 Thread Andrew Barnert via Python-ideas
Since this is python-ideas, not python-list, maybe you’re suggesting that Python _should_ require a type at runtime? If so, there are multiple reasons that won’t work: * “Forward references”, like a Node class with a next element of type Node, work by putting the type name in a string, w

[Python-ideas] Re: Suggestion: Windows launcher default to not using pre-releases by default

2019-07-09 Thread Andrew Barnert via Python-ideas
box”, but even that doesn’t seem too bad. ___________ Python-ideas mailing list -- [email protected] To unsubscribe send an email to [email protected] https://mail.python.org/mailman3/lists/python-ideas.python.org/ Message archived at https://mail.python.org/archives/list/[email protected]/

[Python-ideas] Re: Make tuple a context manager

2019-07-12 Thread Andrew Barnert via Python-ideas
on entry, or on exit? ExitStack answers all of these problems. Maybe the solution is just to make it slightly easier to use ExitStack with an iterable of context managers, and a lot easier for novices to discover it? _______ Python-ideas mailing list -- py

[Python-ideas] Re: Make tuple a context manager

2019-07-12 Thread Andrew Barnert via Python-ideas
I'm not sure how to fix that. (More links to it in the docs, more examples in its own docs, rewrite the "low-level" sentence so it sounds more like an invitation than a warning,  a HOWTO, vigorous proselytizing…?) But I don't think adding one or two wrappers (or, worse, less-powe

[Python-ideas] Re: Non-standard evaluation for Python

2019-07-13 Thread Andrew Barnert via Python-ideas
form of the expression isn’t sufficient but this proposal is?_______ Python-ideas mailing list -- [email protected] To unsubscribe send an email to [email protected] https://mail.python.org/mailman3/lists/python-ideas.python.org/ Message a

[Python-ideas] Re: Non-standard evaluation for Python

2019-07-13 Thread Andrew Barnert via Python-ideas
iption of one. Show what the implementation of plot would look like if it could be handed BoundExpression objects. (Although pd.DataFrame.__getitem__ seems like the killer use case here, so maybe show that one instead, even though it’s probably more complicated.) ____

[Python-ideas] Re: Make tuple a context manager

2019-07-14 Thread Andrew Barnert via Python-ideas
lose each one immediately. Which you can just write like this: for n in range(1000): with open(str(n) + '.tmp', 'w') as f: f.write(str(n)) ___________ Python-ideas mailing list -- [email protected] To unsubs

[Python-ideas] Re: Non-standard evaluation for Python

2019-07-14 Thread Andrew Barnert via Python-ideas
of “x=x”. But are there other benefits, for less trivial cases? _______ Python-ideas mailing list -- [email protected] To unsubscribe send an email to [email protected] https://mail.python.org/mailman3/lists/python-ideas.python.org/ Message archived at http

[Python-ideas] Re: Non-standard evaluation for Python

2019-07-14 Thread Andrew Barnert via Python-ideas
uld be pretty confusing if spam(=eggs+cheese) gave you an argument named “eggs + cheese” instead of “eggs+cheese”. And it would be annoying if you were using it to define labels on a displayed graph—you keep trying to tweak the code to change how the label is written and it doesn’t do what you tell it to do. _

[Python-ideas] Re: Non-standard evaluation for Python

2019-07-14 Thread Andrew Barnert via Python-ideas
flag it as an error to use something that’s ambiguous like that, or… any more complicated thing I can come up with, they’re all just as easy to write. _______ Python-ideas mailing list -- [email protected] To unsubscribe send an email to python-ideas-le..

[Python-ideas] Re: Non-standard evaluation for Python

2019-07-14 Thread Andrew Barnert via Python-ideas
impler compose, I think it’s unlikely that anyone will be interested in adding an operator for pipeline. And certainly not something that looks like %>%. So, this example doesn’t really help sell your proposal. Also, you didn’t answer any of the other issues that have nothing to do with

[Python-ideas] Re: Non-standard evaluation for Python

2019-07-15 Thread Andrew Barnert via Python-ideas
isn’t useful for these cases. If stringifying arbitrary expressions doesn’t get you the actual string that you’d want for things like labels, and can’t give you late eval or any other kind of modified eval, what does it get you? I think in your main use case, where the callee and caller often hav

[Python-ideas] Re: Non-standard evaluation for Python

2019-07-15 Thread Andrew Barnert via Python-ideas
esumably write dt[price * taxrate < x], and get an exception if, say, both tables have price columns, but otherwise get exactly what you expected. I assume you think that’s too unclear or magical or whatever? But then I’m not sure how dt[\price * \taxrate < x] is much better. __

[Python-ideas] Re: Coding using Unicode

2019-07-15 Thread Andrew Barnert via Python-ideas
h Unicode as they add new identifier characters just by upgrading to the newer version of Unicode, instead of having to go over the whole set of new characters each time to decide which ones should be identifiers. _______ Python-ideas mailing list -- p

[Python-ideas] Re: Stdlib Module

2019-07-15 Thread Andrew Barnert via Python-ideas
r, if they find it useful but complain that it can’t do certain things (like tracking differences caused by distributors) without being part of Python itself—you’d have a great case. _______ Python-ideas mailing list -- [email protected] To unsubscribe send

[Python-ideas] Re: Universal parsing library in the stdlib to alleviate security issues

2019-07-15 Thread Andrew Barnert via Python-ideas
trace full of garbage?) Can you add failure handling without breaking the “~200LOC and easy to read” feature of the library, and without breaking the “easy to read once you grok parser combinators” feature of the parsers built with it?_______ Python-ideas m

[Python-ideas] Re: Stdlib Module

2019-07-15 Thread Andrew Barnert via Python-ideas
ure__.py, included in the stdlib directory with every major implementation, and documented alongside things like sys and traceback. _______ Python-ideas mailing list -- [email protected] To unsubscribe send an email to python-ideas-le...@py

[Python-ideas] Re: Stdlib Module

2019-07-15 Thread Andrew Barnert via Python-ideas
both ways, so presumably that’s something that needs to be discussed and decided on usefulness grounds rather than forced on us by an implementation technique._______ Python-ideas mailing list -- [email protected] To unsubscribe send an email to pyt

[Python-ideas] Re: Stdlib Module

2019-07-16 Thread Andrew Barnert via Python-ideas
n (and implementation, platform, etc., if that’s the way the discussion goes). But I’d put that off for an 0.2 version, and get the 0.1 version done and uploaded to github or whatever first. ___ Python-ideas mailing list -- python-ideas@python.

[Python-ideas] Re: Universal parsing library in the stdlib to alleviate security issues

2019-07-16 Thread Andrew Barnert via Python-ideas
the more fun limitation to solve, right? :)___________ Python-ideas mailing list -- [email protected] To unsubscribe send an email to [email protected] https://mail.python.org/mailman3/lists/python-ideas.python.org/ Message archived at https://mail.python.

[Python-ideas] Re: Non-standard evaluation for Python

2019-07-17 Thread Andrew Barnert via Python-ideas
rea between, or whatever. So, how does plot know which argument is y and which is a? It can’t be by the names, because the names are stringified lambda expressions. The only thing it can do is treat the first name-value pair in kwargs as y, and the second we z. In other words, it has to treat them a

[Python-ideas] Re: Non-standard evaluation for Python

2019-07-17 Thread Andrew Barnert via Python-ideas
function? There’s nothing about having one * vs. two that tells you which one is y and which is z. And of course there’s nothing about the values, either. If there’s no way to tell based on the names, and no way to tell based on the values, what way can there be to tell, except for the posi

[Python-ideas] Re: Non-standard evaluation for Python

2019-07-17 Thread Andrew Barnert via Python-ideas
t keywords mean, or how they work, so it’s confusing. Of course you’re right that Python 3.5+ makes it possible to write that code. Python lets you define different sets of names in __dir__ and __ getattt__, or name a function sin when it actually calculates the arctangent, and it lets you pr

[Python-ideas] Re: Scope painting

2019-07-17 Thread Andrew Barnert via Python-ideas
dea and show off some of the ways it could be used. _______ Python-ideas mailing list -- [email protected] To unsubscribe send an email to [email protected] https://mail.python.org/mailman3/lists/python-ideas.python.org/ Message archived at https://mai

[Python-ideas] Re: Scope painting

2019-07-17 Thread Andrew Barnert via Python-ideas
On Jul 17, 2019, at 20:23, Andrew Barnert via Python-ideas wrote: > >> On Jul 17, 2019, at 18:41, Yonatan Zunger wrote: >> >> I'm in the middle of developing a fancy heap profiler for Python (for those >> times when tracemalloc isn't enough), and in the p

[Python-ideas] Re: Scope painting

2019-07-18 Thread Andrew Barnert via Python-ideas
seful when trying to sell people on a feature. _______________ Python-ideas mailing list -- [email protected] To unsubscribe send an email to [email protected] https://mail.python.org/mailman3/lists/python-ideas.python.org/ Message archived at https://mail.python.org/

[Python-ideas] Re: Scope painting

2019-07-19 Thread Ronald Oussoren via Python-ideas
_______ Python-ideas mailing list -- [email protected] To unsubscribe send an email to [email protected] https://mail.python.org/mailman3/lists/python-ideas.python.org/ Message archived at https://mail.python.org/archives/list/[email protected]/message/MKT

[Python-ideas] Re: Universal parsing library in the stdlib to alleviate security issues

2019-07-21 Thread Andrew Barnert via Python-ideas
whatever, they could just as easily be characters that are legal elsewhere in the URL as characters that happen to not be legal anywhere. (If you’re just talking about mitigating one particular attack after it’s been discovered, that’s a different story. If checking for \n patches things without w

[Python-ideas] Re: Universal parsing library in the stdlib to alleviate security issues

2019-07-23 Thread Andrew Barnert via Python-ideas
problems but otherwise provide the same behavior. _______ Python-ideas mailing list -- [email protected] To unsubscribe send an email to [email protected] https://mail.python.org/mailman3/lists/python-ideas.python.org/ Message archived at

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