[Python-ideas] Suggestion for standardized annotations

Chris Angelico rosuav at gmail.com
Sun Mar 9 00:38:37 CET 2014


On Sun, Mar 9, 2014 at 10:24 AM, Cem Karan <cfkaran2 at gmail.com> wrote:
> There are a number of reasons I'm suggesting UUIDs instead of simple strings:

But against that is that they're extremely long. Most other places
where long hex strings are used, humans won't use the full thing. With
git and hg, revisions are identified by hash - but you can use a
prefix, and in most repos, 6-8 hex digits will uniquely identify
something. When humans look at SSH key fingerprints, how many actually
read the whole thing? That's why randart was produced. Tell me, which
of these is different?

def f(x:"f0e4c2f76c58916ec258f246851bea091d14d4247a2fc3e18694461b1816e13b"):
    pass

def asdf(x:"f0e4c2f76c58916ec258f246851bea091d14d4247a2fc3e18694461b1816e13b"):
    pass

def hello_world(x:"f0e4c2f76c58916ec258f246851bea891d14d4247a2fc3e18694461b1816e13b"):
    pass

def testing(x:"f0e4c2f76c58916ec258f246851bea091d14d4247a2fc3e18694461b1816e13b"):
    pass

def longer_function_name(x:"f0e4c2f76c58916ec258f246851bea091d14d4247a2fc3e18694461b1816e13b"):
    pass

As uniqueness guarantors, they're a bit unwieldy, and that makes them
pretty unhelpful.

ChrisA


More information about the Python-ideas mailing list