Verbose and flexible args and kwargs syntax

Discussion in 'Python' started by Eelco Hoogendoorn, Dec 11, 2011.

  1. As for syntax; what about coopting/integrating with the function
    annotation syntax?

    so:

    def func(args: list, kwargs: attrdict)
    and correspondingly in the function call?

    a, b:tuple = someiterable?

    I guess a rule that interprets every function argument annotated as a
    subclass of list or dict as a special case would severely restrict its
    intended use though...
     
    Eelco Hoogendoorn, Dec 11, 2011
    #1
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Eelco Hoogendoorn

    Verbose and flexible args and kwargs syntax

    Eelco Hoogendoorn, Dec 11, 2011, in forum: Python
    Replies:
    1
    Views:
    243
    Steven D'Aprano
    Dec 11, 2011
  2. Eelco Hoogendoorn

    Verbose and flexible args and kwargs syntax

    Eelco Hoogendoorn, Dec 11, 2011, in forum: Python
    Replies:
    0
    Views:
    157
    Eelco Hoogendoorn
    Dec 11, 2011
  3. Eelco Hoogendoorn

    Verbose and flexible args and kwargs syntax

    Eelco Hoogendoorn, Dec 11, 2011, in forum: Python
    Replies:
    88
    Views:
    1,040
    Grant Edwards
    Dec 17, 2011
  4. Eelco Hoogendoorn

    Verbose and flexible args and kwargs syntax

    Eelco Hoogendoorn, Dec 11, 2011, in forum: Python
    Replies:
    0
    Views:
    157
    Eelco Hoogendoorn
    Dec 11, 2011
  5. Eelco Hoogendoorn

    Verbose and flexible args and kwargs syntax

    Eelco Hoogendoorn, Dec 12, 2011, in forum: Python
    Replies:
    0
    Views:
    158
    Eelco Hoogendoorn
    Dec 12, 2011
Loading...

Share This Page