On Thu, 28 Feb 2013 19:47:12 +, The Night Tripper wrote:
> Hi there
> I'm being very dumb ... how can I simplify this fragment?
I suggest that the best way to simplify that fragment is to change the
design of your class so it isn't so horrible. As it stands now, your
class defines an ar
Hi All
thanks very much for the various suggestions - very helpful.
I think I like one of the 'just catch the exception' approaches,
or using Mitya's helper function, which I was clutching towards myself.
Either way, lots of food for thought. This forum really is one of the best
places aroun
On 2013-02-28 16:28, Dave Angel wrote:
> On 02/28/2013 03:37 PM, Tim Chase wrote:
> >for attr in ("myparm1", "myparm2", "myparm3", ...):
> > if arglist:
> >setattr(self, attr, arglist.pop(0))
> > else:
> >break
> >
> Or something like (untested):
>
> for name, va
On 2/28/2013 2:47 PM, The Night Tripper wrote:
Hi there
I'm being very dumb ... how can I simplify this fragment?
if arglist:
arglist.pop(0)
if arglist:
self.myparm1 = arglist.pop(0)
if arglist:
self.
On 02/28/2013 03:37 PM, Tim Chase wrote:
On 2013-02-28 19:47, The Night Tripper wrote:
Hi there
I'm being very dumb ... how can I simplify this fragment?
if arglist:
arglist.pop(0)
if arglist:
self.myparm1 = arglist.pop(0)
On 02/28/2013 02:47 PM, The Night Tripper wrote:
Hi there
> I'm being very dumb ... how can I simplify this fragment?
>
>
> if arglist:
> arglist.pop(0)
> if arglist:
> self.myparm1 = arglist.pop(0)
> if arglist:
> self.myparm2 = arglist.pop(0)
> if arglist:
> self.myparm3 = arglist.pop(0)
> if
On 2013-02-28 19:47, The Night Tripper wrote:
Hi there
I'm being very dumb ... how can I simplify this fragment?
if arglist:
arglist.pop(0)
if arglist:
self.myparm1 = arglist.pop(0)
if arglist:
self.m
On 2013-02-28 19:47, The Night Tripper wrote:
> Hi there
> I'm being very dumb ... how can I simplify this fragment?
>
>
> if arglist:
> arglist.pop(0)
> if arglist:
> self.myparm1 = arglist.pop(0)
> if arglist:
>
On Thursday, February 28, 2013 1:47:12 PM UTC-6, The Night Tripper wrote:
> I'm being very dumb ... how can I simplify this fragment?
>
> if arglist:
> arglist.pop(0)
> if arglist:
> self.myparm1 = arglist.pop(0)
> if arglist:
>
On Thu, Feb 28, 2013 at 2:47 PM, The Night Tripper wrote:
> Hi there
> I'm being very dumb ... how can I simplify this fragment?
>
i = 0
while arglist:
self.myparm[i] = arglist.pop(0)
i += 1
> if arglist:
> arglist.pop(0)
> if arglist:
>
On Thu, Feb 28, 2013 at 12:47 PM, The Night Tripper wrote:
> Hi there
> I'm being very dumb ... how can I simplify this fragment?
>
>
> if arglist:
> arglist.pop(0)
> if arglist:
> self.myparm1 = arglist.pop(0)
> if arglist:
>
Hi there
I'm being very dumb ... how can I simplify this fragment?
if arglist:
arglist.pop(0)
if arglist:
self.myparm1 = arglist.pop(0)
if arglist:
self.myparm2 = arglist.pop(0)
if arglist:
12 matches
Mail list logo