[Python-Dev] Re: Python history: origin of the arrow annotation

2021-03-06 Thread Antoine Pitrou
On Fri, 5 Mar 2021 16:45:25 -0800
Guido van Rossum  wrote:

> Good question. I don't think anyone has ever asked this before... Given the
> variants you propose, I'd say that the 3-character ones would be more
> effort to type without real benefits, and `=>` would at the time (and
> perhaps still :-) be seen as too close to `>=`.
> 
> Could it be that there were already other languages using `->` for return
> types? I do know that we needed something there -- from the start I was a
> fan of `x: int` because it's the same as Pascal (the language I used most
> intensely in college), and if it had been syntactically possible I would
> have used 'def f(): int' for the return type as well, but the LL(1) parser
> in use in 1999-2000 would interpret that as a very short function body.
> 
> It's also possible that it comes from the `->` operator in C, which would
> be the only "ASCII art arrow" that I was familiar with at the time.

Note that nowadays you can use `->` to denote function return types in
C++ (that was not the case in 1999, though).
It's also the only allowed style for anonymous functions ("lambdas"):
https://en.cppreference.com/w/cpp/language/function
https://en.cppreference.com/w/cpp/language/lambda

Regards

Antoine.


___
Python-Dev mailing list -- [email protected]
To unsubscribe send an email to [email protected]
https://mail.python.org/mailman3/lists/python-dev.python.org/
Message archived at 
https://mail.python.org/archives/list/[email protected]/message/K75WNUFDLY55FMYY5UID7EEEXWGNJZY3/
Code of Conduct: http://python.org/psf/codeofconduct/


[Python-Dev] Requesting Review for GH-24118 (Fix for bpo-27820)

2021-03-06 Thread Pandu Poluan
Hi all,

I have submitted a PR, GH-24118 (
https://github.com/python/cpython/pull/24118), on January 5.

It's a relatively simple patch that fixes smtplib.SMTP logic for AUTH
LOGIN, alongside a fix for the test for that class.

The PR has passed all checks, and I have also signed the CLA.

I've pinged the relevant bpo more than a week ago, but the PR's status is
still "awaiting review".

I'd appreciate it if someone can spare some time to do a review on this
simple patch.


Rgds.
--
FdS Pandu E Poluan
~ IT Optimizer ~

 • LOPSA Member #15248
 • Linked-In : https://id.linkedin.com/in/pepoluan
 • GPG Key ID: E3C3 F0C4 ABF8 B8D7
___
Python-Dev mailing list -- [email protected]
To unsubscribe send an email to [email protected]
https://mail.python.org/mailman3/lists/python-dev.python.org/
Message archived at 
https://mail.python.org/archives/list/[email protected]/message/F2N4N2COQWJBTZNFIYZN7VVKT6Y62NKW/
Code of Conduct: http://python.org/psf/codeofconduct/