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
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/
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]
___
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
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
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
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:
>
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/
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
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
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
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
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
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/
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
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
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:/
� 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
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/
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
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
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
-
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]
_________
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]
______
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
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/
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/__
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:/
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...@
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
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
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/
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
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?
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
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]
___
(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
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
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
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
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
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
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
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
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
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
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
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
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”).__________
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 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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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]/
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
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
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
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.)
____
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
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
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.
_
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..
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
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
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.
__
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
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
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
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
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
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.
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.
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
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
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
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
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
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 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
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
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
301 - 400 of 1693 matches
Mail list logo