Movatterモバイル変換


[0]ホーム

URL:


[Python-Dev] PEP 563: Postponed Evaluation of Annotations

Brett Cannonbrett at python.org
Mon Nov 13 16:59:22 EST 2017


On Sun, Nov 12, 2017, 10:22 Koos Zevenhoven, <k7hoven at gmail.com> wrote:> On Nov 12, 2017 19:10, "Guido van Rossum" <guido at python.org> wrote:>> On Sun, Nov 12, 2017 at 4:14 AM, Koos Zevenhoven <k7hoven at gmail.com>> wrote:>>> So actually my question is: What should happen when the annotation is>> already a string literal?>>>> The PEP answers that clearly (under Implementation):>> > If an annotation was already a string, this string is preserved> > verbatim.>>> Oh sorry, I was looking for a spec, so I somehow assumed I can ignore the> gory implementation details just like I routinely ignore things like> headers and footers of emails.>> There's two thing I don't understand here:>> * What does it mean to preserve the string verbatim? No matter how I read> it, I can't tell if it's with quotes or without.>> Maybe I'm missing some context.>I believe the string passes through unchanged (i.e. no quotes). Think ofthe PEP as simply turning all non-string annotations into string ones.-brett>> -- Koos (mobile)>> _______________________________________________> Python-Dev mailing list>Python-Dev at python.org>https://mail.python.org/mailman/listinfo/python-dev> Unsubscribe:>https://mail.python.org/mailman/options/python-dev/brett%40python.org>-------------- next part --------------An HTML attachment was scrubbed...URL: <http://mail.python.org/pipermail/python-dev/attachments/20171113/f7a707cc/attachment.html>


More information about the Python-Devmailing list

[8]ページ先頭

©2009-2025 Movatter.jp