Greg Ewing schrieb: > So concatenating mutable and immutable should give the > same result as concatenating two immutables, i.e. an > immutable. If you need to add something to the end of > your buffer, while keeping it mutable, you use extend(). > > This gives us > > immutable + immutable -> immutable > mutable + immutable -> immutable > immutable + mutable -> immutable > mutable + mutable -> mutable (*)
NB: when dealing with sets and frozensets, you get the type of the first operand. Doing something different here is confusing. Georg -- Thus spake the Lord: Thou shalt indent with four spaces. No more, no less. Four shall be the number of spaces thou shalt indent, and the number of thy indenting shall be four. Eight shalt thou not indent, nor either indent thou two, excepting that thou then proceed to four. Tabs are right out. _______________________________________________ Python-3000 mailing list [email protected] http://mail.python.org/mailman/listinfo/python-3000 Unsubscribe: http://mail.python.org/mailman/options/python-3000/archive%40mail-archive.com
