Newbi Q: What is a rational for strings not being lists in Python?

Neil Cerutti horpner at yahoo.com
Tue Oct 16 08:44:36 EDT 2007


On 2007-10-16, Simon Brunning <simon at brunningonline.net> wrote:
> On 10/16/07, Benjamin <musiccomposition at gmail.com> wrote:
>
>> Good explanation, but basically strings are immutable so they can be
>> used in dicts.
>
> Nope. Value types should always be immutable.
>
><http://c2.com/cgi/wiki?ValueObjectsShouldBeImmutable>

And strings are considered value objects because...

-- 
Neil Cerutti



More information about the Python-list mailing list