Indentation and optional delimiters

castironpi at gmail.com castironpi at gmail.com
Fri Feb 29 08:21:10 EST 2008


On Feb 28, 3:18 pm, "Terry Reedy" <tjre... at udel.edu> wrote:
> <bearophileH... at lycos.com> wrote in message
>
> news:318b03dc-4cc5-49de-aeb9-e1b6e590007f at u10g2000prn.googlegroups.com...
> | But the default behavior may become the "true" copy, that seems
> | simpler for a newbie to grasp.
>
> To me, it is the opposite.  If I say
> gvr = Guido_van_Russum # or any natural language equivalent
> do you really think a copy is made?
>
> Copying is much more work than defining an alias or nickname.

It's interesting.  If I say minigvr= Guido_van_Rossum except smaller,
my listener carries both the original model and the exception around
during the conversation.  minigvr= type( 'MiniGvr',
( Guido_van_Rossum, ), dict( size= 0.5 ) )(), creates a MiniGvr class -
and- -instantiates- it, just with a different size.  It depends-- if
you say, "what if mini-guido were to go to the store" it's very
different from saying, "what if mini-guidos were to go to the store"?
The first 'mini-guido' is an instance, and you're running the
hypothesis in a sandbox or playpen.  The second is different.  The
listener subclasses Guido_van_Rossum, but still in the sandbox.  If
you said, 'a mini-guido went to the store yesterday', the listener
would run type( 'MiniGvr', ( Guido_van_Rossum, ), dict( size= 0.5 ) )
().goestostore( time= Time.Yesterday ).

What's more, you can the next day say, "Remember that miniguido that
went to the store," "Remember that miniguido I told you about
yesterday," or even, "Remember that miniguido that went to the store
that I told you about?" and your listener can say, "Yeah, that was two
days ago now."  However, isinstance checks sometimes don't work:
"Remember that GvR that went to the store?"  "No, you never told me
GvR went to the store.... wait, unless you mean the -Mini-GvR."

Your actual call is closer to this: memory.add( event=
Event.GoToStore( type( 'MiniGvr', ( Guido_van_Rossum, ), { 'size':
0.5 } )() ), time= Time.Yesterday ), but Go is also abstracted
( (destination= Store) ), Store is abstracted (SomeStore), (unless you
and the listener have a "the store" you always call in common), and he
may actually interpret "was at the store" instead of "went to",
depending on your interaction's particular idiolect; you might use
slightly different words to tell a co-worker the same story.  Last but
not least, the data that filters down into the hardware of the brain
is partly non-propositional-- the listener gets a somewhat clear
picture in your preamble, which varies in clarity and what detail from
speaker to speaker and listener to listener pair.

If you want a computer language to model human thought, then is there
even such thing as subclassing?  Otherwise, it's a toolbox, and pass-
by-reference is to a flathead screwdriver as pass-by-value is to a
Phillips.  Which one do you want to carry, and which is the snap-on
extension?  Doesn't that vary trade-to-trade, tradesman-to-tradesman,
and even site-to-site?



More information about the Python-list mailing list