On Oct 24, 3:46 pm, Duncan Booth <[EMAIL PROTECTED]> wrote:
> For a 'python like' look lose the Hungarian notation (even Microsoft
> have largely stopped using it)
I wish I could.
But my corporation do not want to apply python.org coding rules
> increase the indentation to 4 spaces,
Well, it is
On Oct 24, 9:04 am, "A.T.Hofkamp" <[EMAIL PROTECTED]> wrote:
> > On 2007-10-24, Alexandre Badez <[EMAIL PROTECTED]> wrote:
> > I'm just wondering, if I could write a in a "better" way this
> > code
>
> > lMandatory = []
> > lOptional = []
> > for arg in cls.dArguments:
> > if arg is True:
> >
Bjoern Schliessmann a écrit :
> Alexandre Badez wrote:
>> I'm just wondering, if I could write a in a "better" way this code
>> [...]
>> I think there is a better way, but I can't see how...
>
> What's "better" for you? Shorter? More performant? More readable?
> Complying with best practice? Close
On Wed, 24 Oct 2007 16:04:28 +0200, A.T.Hofkamp wrote:
>> On 2007-10-24, Alexandre Badez <[EMAIL PROTECTED]> wrote:
>> I'm just wondering, if I could write a in a "better" way this
>> code
>>
>> lMandatory = []
>> lOptional = []
>> for arg in cls.dArguments:
>> if arg is True:
>> lMandatory.
[EMAIL PROTECTED] a écrit :
(snip)
> Anyone know why towards arg is True and arg is False, arg is None is
> faster than arg == None ...
Perhaps reading about both the meaning of the 'is' operator might help ?
the expression 'arg is True' will only eval to true if 'id(arg) ==
id(True)'. Now Pyt
On Oct 24, 10:42 am, [EMAIL PROTECTED] wrote:
> On Oct 24, 4:15 pm, Paul Hankin <[EMAIL PROTECTED]> wrote:
>
>
>
> > On Oct 24, 2:02 pm, [EMAIL PROTECTED] wrote:
>
> > > On Oct 24, 7:09 am, Alexandre Badez <[EMAIL PROTECTED]> wrote:
>
> > > > I'm just wondering, if I could write a in a "better" way
On Oct 24, 4:15 pm, Paul Hankin <[EMAIL PROTECTED]> wrote:
> On Oct 24, 2:02 pm, [EMAIL PROTECTED] wrote:
>
>
>
> > On Oct 24, 7:09 am, Alexandre Badez <[EMAIL PROTECTED]> wrote:
>
> > > I'm just wondering, if I could write a in a "better" way this code
>
> > > lMandatory = []
> > > lOptional = []
> Here is my real code:
>
> with
> dArguments = {
> 'argName' : {
> 'mandatory' : bool, # True or False
> [...], # other field we do not care here
> }
> }
>
> lMandatory = []
> lOptional = []
> for arg in cls.dArguments:
> if cls.dArguments[arg]['mandatory']:
> lMandatory.append
On Oct 24, 2:02 pm, [EMAIL PROTECTED] wrote:
> On Oct 24, 7:09 am, Alexandre Badez <[EMAIL PROTECTED]> wrote:
>
> > I'm just wondering, if I could write a in a "better" way this code
>
> > lMandatory = []
> > lOptional = []
> > for arg in cls.dArguments:
> > if arg is True:
> > lMandatory.app
Alexandre Badez wrote:
> I'm just wondering, if I could write a in a "better" way this code
> [...]
> I think there is a better way, but I can't see how...
What's "better" for you? Shorter? More performant? More readable?
Complying with best practice? Closely following a specific
programming parad
> On 2007-10-24, Alexandre Badez <[EMAIL PROTECTED]> wrote:
> I'm just wondering, if I could write a in a "better" way this
> code
>
> lMandatory = []
> lOptional = []
> for arg in cls.dArguments:
> if arg is True:
> lMandatory.append(arg)
> else:
> lOptional.append(arg)
> return (lMand
On Oct 24, 8:02 am, [EMAIL PROTECTED] wrote:
> On Oct 24, 7:09 am, Alexandre Badez <[EMAIL PROTECTED]> wrote:
>
> > I'm just wondering, if I could write a in a "better" way this code
>
> > lMandatory = []
> > lOptional = []
> > for arg in cls.dArguments:
> > if arg is True:
> > lMandatory.app
Alexandre Badez <[EMAIL PROTECTED]> wrote:
> Thanks for your try Cliff, I was very confused :P
> More over I made some mistake when I post (to make it easiest).
>
> Here is my real code:
>
> with
> dArguments = {
> 'argName' : {
> 'mandatory' : bool, # True or False
> [...], # other fi
Thanks for your try Cliff, I was very confused :P
More over I made some mistake when I post (to make it easiest).
Here is my real code:
with
dArguments = {
'argName' : {
'mandatory' : bool, # True or False
[...], # other field we do not care here
}
}
lMandatory = []
lOptional = []
fo
Hi Alexandre,
On Oct 24, 2:09 pm, Alexandre Badez <[EMAIL PROTECTED]> wrote:
> I'm just wondering, if I could write a in a "better" way this code
Please tell us, what it is you want to achieve. And give us some
context
for this function.
> lMandatory = []
> lOptional = []
> for arg in cls.dArgum
On 2007-10-24, Alexandre Badez <[EMAIL PROTECTED]> wrote:
> I'm just wondering, if I could write a in a "better" way this
> code
>
> lMandatory = []
> lOptional = []
> for arg in cls.dArguments:
> if arg is True:
> lMandatory.append(arg)
> else:
> lOptional.append(arg)
> return (lMandat
On 10/24/07, J. Clifford Dyer <[EMAIL PROTECTED]> wrote:
>
> On Wed, Oct 24, 2007 at 12:09:40PM -, Alexandre Badez wrote regarding
> Better writing in python:
> >
> > lMandatory = []
> > lOptional = []
> > for arg in cls.dArguments:
> > if arg is True:
> > lMandatory.append(arg)
> > els
On Oct 24, 7:09 am, Alexandre Badez <[EMAIL PROTECTED]> wrote:
> I'm just wondering, if I could write a in a "better" way this code
>
> lMandatory = []
> lOptional = []
> for arg in cls.dArguments:
> if arg is True:
> lMandatory.append(arg)
> else:
> lOptional.append(arg)
> return (lMan
On Oct 24, 1:09 pm, Alexandre Badez <[EMAIL PROTECTED]> wrote:
> I'm just wondering, if I could write a in a "better" way this code
>
> lMandatory = []
> lOptional = []
> for arg in cls.dArguments:
> if arg is True:
> lMandatory.append(arg)
> else:
> lOptional.append(arg)
> return (lMan
On Oct 24, 1:09 pm, Alexandre Badez <[EMAIL PROTECTED]> wrote:
> I'm just wondering, if I could write a in a "better" way this code
>
> lMandatory = []
> lOptional = []
> for arg in cls.dArguments:
> if arg is True:
> lMandatory.append(arg)
> else:
> lOptional.append(arg)
> return (lMan
On Oct 24, 1:09 pm, Alexandre Badez <[EMAIL PROTECTED]> wrote:
> I'm just wondering, if I could write a in a "better" way this code
>
> lMandatory = []
> lOptional = []
> for arg in cls.dArguments:
> if arg is True:
> lMandatory.append(arg)
> else:
> lOptional.append(arg)
> return (lMan
On Wed, 24 Oct 2007 12:09:40 +, Alexandre Badez wrote:
> I'm just wondering, if I could write a in a "better" way this code
>
> lMandatory = []
> lOptional = []
> for arg in cls.dArguments:
> if arg is True:
> lMandatory.append(arg)
> else:
> lOptional.append(arg)
> return (lManda
On Wed, Oct 24, 2007 at 12:09:40PM -, Alexandre Badez wrote regarding
Better writing in python:
>
> lMandatory = []
> lOptional = []
> for arg in cls.dArguments:
> if arg is True:
> lMandatory.append(arg)
> else:
> lOptional.append(arg)
> return (lMandatory, lOptional)
>
> I thin
23 matches
Mail list logo