1. Python / Говнокод #26017

    0

    1. 01
    2. 02
    3. 03
    4. 04
    5. 05
    6. 06
    7. 07
    8. 08
    9. 09
    10. 10
    11. 11
    12. 12
    Building on that example, the new syntax for function definitions would look like:
    
    def name(positional_only_parameters, /, positional_or_keyword_parameters,
             *, keyword_only_parameters):
    
    Therefore the following would be valid function definitions:
    
    def name(p1, p2, /, p_or_kw, *, kw):
    def name(p1, p2=None, /, p_or_kw=None, *, kw):
    def name(p1, p2=None, /, *, kw):
    def name(p1, p2=None, /):
    def name(p1, p2, /, p_or_kw):

    https://www.python.org/dev/peps/pep-0570

    Запостил: 3.14159265, 07 Ноября 2019

    Комментарии (199) RSS

    Добавить комментарий