Python 'any()' buildt-in function evaluation sequence -


this question has answer here:

is there guaranteed evaluation sequence 'any()' built-in function? is, safe assume

any([..., x, ... y, ...]) 

will check condition 'x' before 'y' 'x' listed before 'y'?

note, question on 'is shortcircuit behaviour of python's any/all explicit?' deals 'short-circuit behavior'. not deal evaluation sequence!

please, provide proof/reference suggested statements.

it depends on iterable itself. if ordered (ie list) yes.

if isn't ordered (ie dictionary) not.

what guaranteed evaluation stop when first true-ish value reached.


Comments

Popular posts from this blog

gridview - Yii2 DataPorivider $totalSum for a column -

java - Suppress Jboss version details from HTTP error response -

Sass watch command compiles .scss files before full sftp upload -