[Baypiggies] stat.ST_BLKSIZE?
Warren DeLano
warren at delsci.com
Sun Jan 22 21:00:57 CET 2006
> why should I have to type quotes and square brackets
> when a dot will do?
What about pickling/unpickling convenience? Dictionaries don't have
class definition dependencies, and can thus be unpickled (anywhere &
anytime) without reference to external Python modules.
Or is there such a thing as a classless Python object that would combine
the syntactic convenience of attributes with the independent marshalling
of a dictionary?
(assuming of course that the container holds only builtin types, not
arbitrary objects).
Cheers,
Warren
--
Warren L. DeLano, Ph.D.
Principal Scientist
. DeLano Scientific LLC
. 400 Oyster Point Blvd., Suite 213
. South San Francisco, CA 94080 USA
. Biz:(650)-872-0942 Tech:(650)-872-0834
. Fax:(650)-872-0273 Cell:(650)-346-1154
. mailto:warren at delsci.com
> -----Original Message-----
> From: baypiggies-bounces at python.org
> [mailto:baypiggies-bounces at python.org] On Behalf Of Guido van Rossum
> Sent: Saturday, January 21, 2006 6:38 PM
> To: Chris Palmer
> Cc: baypiggies at python.org
> Subject: Re: [Baypiggies] stat.ST_BLKSIZE?
>
> On 1/21/06, Chris Palmer <chris at noncombatant.org> wrote:
> > Will this API ever be cleaned up, having only one return value with
> > all items visible? It's confusing to show a tuple but to
> also have a
> > secret object with more stuff in it. To me, the natural choice of
> > return value is a dictionary containing everything the
> underlying OS provides.
>
> We'll clean it up in 3.0. Until then, we can't, for backwards
> compatibility reasons that should be obvious.
>
> As far as the "ideal" API, I much prefer attributes over a
> dict -- why should I have to type quotes and square brackets
> when a dot will do?
> There's always the introspection API (e.g. dir()) if for some
> obscure reason you need the list of all supported names.
>
> --
> --Guido van Rossum (home page: http://www.python.org/~guido/)
> _______________________________________________
> Baypiggies mailing list
> Baypiggies at python.org
> http://mail.python.org/mailman/listinfo/baypiggies
>
>
>
>
More information about the Baypiggies
mailing list