> "Gordon" == Gordon Airporte <[EMAIL PROTECTED]> writes:
Gordon> I'm wondering if this is might be bad practice. Sometimes
Gordon> when I need to pass around several pieces of datum I will
Gordon> put them in a tuple, then when I need to use them in a
Gordon> receiving functio
ok, so that is simply a wrapper of a dict and has nothing to do with
parameter passing and it can be used anyway within the receiving
function(or basically anyway I want to say x.key rather than x[key]).
def f(**kwargs):
x = Bunch(kwargs)
x.some_key_as_attribute = something
Robert Kern wro
[EMAIL PROTECTED] wrote:
> just curious, since python don't care what object is being passing
> around and the receiving function has to 'decode' it(be it tuple or
> dict or whatever). What is the advantage of dummy class ?
The convenience of the attribute notation.
For the record, my favorite va
just curious, since python don't care what object is being passing
around and the receiving function has to 'decode' it(be it tuple or
dict or whatever). What is the advantage of dummy class ?
Alex Martelli wrote:
> Gordon Airporte <[EMAIL PROTECTED]> wrote:
>
> > I'm wondering if this is might be
Gordon Airporte <[EMAIL PROTECTED]> wrote:
> I'm wondering if this is might be bad practice. Sometimes when I need to
I hope not, 'cuz I suggested that years ago on the Cookbook (under the
name of Bunch) with several successive refinements.
> class Dummy:
> pass
>
> Then when I need to pa
I'm wondering if this is might be bad practice. Sometimes when I need to
pass around several pieces of datum I will put them in a tuple, then
when I need to use them in a receiving function I get them out with
subscripts. The problem is that the subscript number is completely
meaningless and I