Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

DeprecationWarning

See the question in the example below. What is the cause off the inconsistency with respect to generating the DeprecationWarning?

 def testing(fn):
    print(fn(1))
    return

expr=x
testing(expr) # Yields DeprecationWarning: Substitution using function-call syntax and unnamed arguments ...
print(expr(1)) # No deprecation warning here. Why?

fn(x)=x
testing(fn) # No deprecation warnings here either.
print(fn(1))