On 11Feb2019 08:17, Irv Kalb wrote:
On Feb 11, 2019, at 7:25 AM, Neal Becker wrote:
I have code with structure:
```
if cond1:
[some code]
if cond2: #where cond2 depends on the above [some code]
[ more code]
else:
[ do xxyy ]
else:
[ do the same xxyy as above ]
```
So what's the best
Chris Angelico wrote:
> On Tue, Feb 12, 2019 at 3:21 AM Neal Becker wrote:
>>
>> Chris Angelico wrote:
>>
>> > On Tue, Feb 12, 2019 at 2:27 AM Neal Becker
>> > wrote:
>> >>
>> >> I have code with structure:
>> >> ```
>> >> if cond1:
>> >> [some code]
>> >> if cond2: #where cond2 depends on t
> On Feb 11, 2019, at 7:25 AM, Neal Becker wrote:
>
> I have code with structure:
> ```
> if cond1:
> [some code]
> if cond2: #where cond2 depends on the above [some code]
>[ more code]
>
> else:
>[ do xxyy ]
> else:
> [ do the same xxyy as above ]
> ```
>
> So what's the best sty
On Tue, Feb 12, 2019 at 3:21 AM Neal Becker wrote:
>
> Chris Angelico wrote:
>
> > On Tue, Feb 12, 2019 at 2:27 AM Neal Becker wrote:
> >>
> >> I have code with structure:
> >> ```
> >> if cond1:
> >> [some code]
> >> if cond2: #where cond2 depends on the above [some code]
> >> [ more cod
Chris Angelico wrote:
> On Tue, Feb 12, 2019 at 2:27 AM Neal Becker wrote:
>>
>> I have code with structure:
>> ```
>> if cond1:
>> [some code]
>> if cond2: #where cond2 depends on the above [some code]
>> [ more code]
>>
>> else:
>> [ do xxyy ]
>> else:
>> [ do the same xxyy as a
On 2/11/19 9:25 AM, Neal Becker wrote:
I have code with structure:
```
if cond1:
[some code]
if cond2: #where cond2 depends on the above [some code]
[ more code]
else:
[ do xxyy ]
else:
[ do the same xxyy as above ]
```
So what's the best style to handle this? As coded, i
On Tue, Feb 12, 2019 at 2:27 AM Neal Becker wrote:
>
> I have code with structure:
> ```
> if cond1:
> [some code]
> if cond2: #where cond2 depends on the above [some code]
> [ more code]
>
> else:
> [ do xxyy ]
> else:
> [ do the same xxyy as above ]
> ```
>
> So what's the best s
Rhodri James wrote:
> On 11/02/2019 15:25, Neal Becker wrote:
>> I have code with structure:
>> ```
>> if cond1:
>>[some code]
>>if cond2: #where cond2 depends on the above [some code]
>> [ more code]
>>
>>else:
>> [ do xxyy ]
>> else:
>>[ do the same xxyy as above ]
>>
On 11/02/2019 15:25, Neal Becker wrote:
I have code with structure:
```
if cond1:
[some code]
if cond2: #where cond2 depends on the above [some code]
[ more code]
else:
[ do xxyy ]
else:
[ do the same xxyy as above ]
```
So what's the best style to handle this? As coded,
I have code with structure:
```
if cond1:
[some code]
if cond2: #where cond2 depends on the above [some code]
[ more code]
else:
[ do xxyy ]
else:
[ do the same xxyy as above ]
```
So what's the best style to handle this? As coded, it violates DRY.
Try/except could be used with
10 matches
Mail list logo