c[:]()

Warren Stringer warren at muse.com
Wed May 30 20:24:38 EDT 2007


Hey Dustan, very cool!

The first hit on "python is not java" turns up the dirtsimple blog, which
kicked my asp -- so, to speak (reptile not server pages - mon dieu, I'm
explain a pun, how wretched) ...

Dirtsimple mentions shallow versus deep. Damn!

First off, I love dots. They're easy to type. I like to go deep. Yet have
been finding that a.b.c.d.e.f() tends to suck __getattr__ 

The dirtsimple blog also mentions using hash-trees as a switch
statement...hmmmm .... I wonder which is faster:

a.b.c.d.e.f() 		# or 
h['a.b.c.d.e.f']() 	# doh!

I still want my executable container though. Would love to so this

h[search('a//f')]()   # where a//f is like an Xpath // search for leaves

Believe me, this is incredibly useful for executing an ontology, which
happens to be what I'm working on during every waking moment, when not on
the python list. 

Cheers,

\~/

> -----Original Message-----
> From: python-list-bounces+warren=muse.com at python.org [mailto:python-list-
> bounces+warren=muse.com at python.org] On Behalf Of Dustan
> Sent: Wednesday, May 30, 2007 4:14 PM
> To: python-list at python.org
> Subject: Re: c[:]()
> 
> On May 30, 5:37 pm, "Warren Stringer" <war... at muse.com> wrote:
> > Hey many thanks for the replies!
> >
> > Ah, so is seems that c[:][:][:][:][:][:][:][:][:][:][:][0]()
> > also work ...
> >
> > Ah well, can't have everything. Guess I was inspired by the
> alphabetically
> > adjacent message "Call for Ruby Champion". Would have been nice for it
> work
> > - a more elegant iterator would be hard to come by. A PEP, perhaps?
> Maybe
> > not; am still a bit new - am probably missing something obvious why this
> > isn't an easy fix.
> >
> > Pretty cool that I can override the list class.
> >
> > Cheers,
> 
> Do a search on "python is not java" (words to live by). You can also
> plug in another language you know (like Ruby), but you won't get as
> many results.
> 
> --
> http://mail.python.org/mailman/listinfo/python-list





More information about the Python-list mailing list