Embedded comments in Python?

Ville Vainio ville at spammers.com
Mon May 3 10:24:42 EDT 2004


>>>>> "Ernie" == Ernie  <eadorio at yahoo.com> writes:

    Ernie> def foo(a <:int>, b <:float>): <:array>
    Ernie> return [a, b] 

    Ernie> Want the CPython interpreter to ignore the <:int>, <:float> and
    Ernie> <:array>(this one can be written as #array). Using triple quoted

I imagine this would be something that would work best with the
upcoming decorators. That way you could also use the 'comments' as a
way to validate that the correct types of arguments actually go in to
the method/function in "debug builds".

-- 
Ville Vainio   http://tinyurl.com/2prnb



More information about the Python-list mailing list