[Home] [Groups] - Message: [Prev in Group] [Next in Group]
12389: Re: [MUD-Dev] Event Scheduling
[Full Header] [Plain Text]
From: J C Lawrence <claw@kanga.nu>
Newsgroups: nu.kanga.list.mud-dev
Date: Tue, 08 Feb 2000 10:18:54 -0800
References: [1] [2] <-newest
Organization: Kanga.Nu
On 08 Feb 2000 11:33:12 +0100
Miroslav Silovic <silovic@zesoi.fer.hr> wrote:
> While I'm not Python programmer, the main issue with Python is
> that its datastructures are not overwritable...
More correctly, some Python data types are immutable leaving the
only method of internal manipulation the creation of new objects of
that type with the requisite data contents. Strings and tuples, for
instance, are immutable under Python, but lists and dictionaries are
quite definitely mutable.
Happily enough from a syntactical PoV, the syntax for immutable and
mutable objects, is identical, and the handling of references,
object copies, etc, is also quite transparent.
> If Python copies the entire heap on each schedule, then you end up
> with square complexity even with the heap.
Given that heaps are generally implemented as lists or dictionaries
(out of the catalog of basic Python types), and that both are
mutable, this is not a problem
--
J C Lawrence Home: claw@kanga.nu
----------(*) Other: coder@kanga.nu
--=| A man is as sane as he is dangerous to his environment |=--
_______________________________________________
MUD-Dev maillist - MUD-Dev@kanga.nu
http://www.kanga.nu/lists/listinfo/mud-dev