Message337384
Agreed with @remi.lapeyre. There is no delayed evaluation in Python and this is not only related to print but it's the general evaluation model in Python. Another example as below since foo(1) is used as an argument it's evaluated first and then the return value is passed.
def bar(a, b):
print("bar ", a, b)
return (a, b)
def foo(b):
print("foo ", b)
return b
bar(foo(1), 2) # foo is first evaluated to pass 1 bar
$ python3 /tmp/foo.py
foo 1
bar 1 2
Closing this as not a bug. |
|
Date |
User |
Action |
Args |
2019-03-07 10:45:10 | xtreak | set | recipients:
+ xtreak, remi.lapeyre, iitkgp.ketan@gmail.com |
2019-03-07 10:45:10 | xtreak | set | messageid: <1551955510.23.0.759526387941.issue36223@roundup.psfhosted.org> |
2019-03-07 10:45:10 | xtreak | link | issue36223 messages |
2019-03-07 10:45:10 | xtreak | create | |
|