Noob: What is a slot? Me trying to understand another's code
Marc 'BlackJack' Rintsch
bj_666 at gmx.net
Wed Sep 5 11:15:43 EDT 2007
On Tue, 04 Sep 2007 13:03:16 -0500, Carnell, James E wrote:
> I am thinking about purchasing a book, but wanted to make sure I could
> get through the code that implements what the book is about (Artificial
> Intelligence a Modern Approach). Anyway, I'm not a very good programmer
> and OOP is still sinking in, so please don't answer my questions like I
> really know anything.
>
> MY QUESTION:
> What is a slot? In class Object below the __init__ has a slot. Note:
> The slot makes use of a data object called 'percept' that is used in the
> TableDrivenAgent(Agent) at the bottom of this post. I am guessing this
> is a type of Finite State Machine (I haven't bought the book yet so I am
> guessing).
>
> […]
>
> Anyway, why a slot (whatever that is)?
>
> [Example code snipped.]
If you want to learn Python don't do it with that book because the authors
seem to write another programming language using Python syntax. I guess
there's an older issue of that book that used the SmallTalk programming
language and they switched to Python syntactically but not mentally and not
the vocabulary. A "slot" in SmallTalk is called "attribute" in Python.
Ciao,
Marc 'BlackJack' Rintsch
More information about the Python-list
mailing list