>  >>> seq = [1,2]
> 
>  >>> seq.extend((3,4))

OK, this feature is referenced in the Python Library reference here : 

https://docs.python.org/3.2/library/stdtypes.html#typesseq-mutable

not thoroughly referenced but, anyway, referenced.





> 
>  >>> seq+= {5, 6}  # the order of extending is not determined
> 
>  >>> seq
> 
> [1, 2, 3, 4, 5, 6]
> 
>  >>>

Good and interesting observation. But I can't find out where this feature is 
referenced in the Language/Library Reference. Because, as my first post 
explains, augmented assignment performs the binary operation associated to the 
augmented assignment, cf. 

https://docs.python.org/3.2/reference/simple_stmts.html#augmented-assignment-statements

so seq+= {5, 6} performs seq + {5, 6}, the later raising a TypeError.
-- 
https://mail.python.org/mailman/listinfo/python-list

Reply via email to