In python, immutable variable types are int, bool, string and so on, all of them are considered as a single value variable, thus making them immutable insures the function calls behavior like other languages , c for example.
But for list and dict, usually it is considered as *args and **kwdargs, which are passed as pointers, thus making them mutabe again insures the function call behaviors like other languages.
--
Zhijia
Confidentiality Notice: This message (including attachments) is a private communication solely for use of the intended recipient(s). If you are not the intended recipient(s) or believe you received this message in error, notify the sender immediately and then delete this message. Any other use, retention, dissemination or copying is prohibited and may be a violation of law, including the Electronic Communication Privacy Act of 1986."
No comments:
Post a Comment