Re: [Python-ideas] Trial balloon: adding variable type

Date: Wed, 3 Aug 2016 09:11:42 -0700 From: Guido van Rossum <guido@python.org>
... It would be much cleaner if you could declare the
variable before the first `if`. But picking a good initializer is tricky, especially if you have a type that does not include None.
PEP-484 suggests ellipsis for this. ~Elazar

On Wed, Aug 3, 2016 at 10:52 AM, אלעזר <elazarg@gmail.com> wrote:
But x = ... already has a meaning -- it assigns x the (fairly pointless) value Ellipsis (which is a singleton object like None). -- --Guido van Rossum (python.org/~guido)

On Wed, Aug 3, 2016 at 10:52 AM, אלעזר <elazarg@gmail.com> wrote:
But x = ... already has a meaning -- it assigns x the (fairly pointless) value Ellipsis (which is a singleton object like None). -- --Guido van Rossum (python.org/~guido)
participants (4)
-
Greg Ewing
-
Guido van Rossum
-
Michael Selik
-
אלעזר