On 08/08/2022 12:59, Dan Purgert wrote:
dn wrote:
On 06/08/2022 11.41, avi.e.gr...@gmail.com wrote:
I wonder if someone is pulling our leg as they are sending from an
invalid email address of "GB " which is
a bit sick.
There are a number of folk who use evidently false email addresses - the
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA512
dn wrote:
> On 06/08/2022 11.41, avi.e.gr...@gmail.com wrote:
>> I wonder if someone is pulling our leg as they are sending from an
>> invalid email address of "GB " which is
>> a bit sick.
>
> There are a number of folk who use evidently false email
Behalf Of Chris Angelico
Sent: Saturday, August 6, 2022 8:12 AM
To: python-list@python.org
Subject: Re: Trying to understand nested loops
On Sat, 6 Aug 2022 at 22:08, Richard Damon wrote:
>
> On 8/6/22 12:01 AM, Chris Angelico wrote:
> > On Sat, 6 Aug 2022 at 13:54, Dan Stromberg wrote:
On Sat, 6 Aug 2022 at 22:39, Richard Damon wrote:
>
> On 8/6/22 8:12 AM, Chris Angelico wrote:
> > On Sat, 6 Aug 2022 at 22:08, Richard Damon wrote:
> >> On 8/6/22 12:01 AM, Chris Angelico wrote:
> >>> On Sat, 6 Aug 2022 at 13:54, Dan Stromberg wrote:
> On Fri, Aug 5, 2022 at 12:54 PM Grant
On 8/6/22 8:12 AM, Chris Angelico wrote:
On Sat, 6 Aug 2022 at 22:08, Richard Damon wrote:
On 8/6/22 12:01 AM, Chris Angelico wrote:
On Sat, 6 Aug 2022 at 13:54, Dan Stromberg wrote:
On Fri, Aug 5, 2022 at 12:54 PM Grant Edwards
wrote:
In C, this doesn't do what it looks like it's suppose
On Sat, 6 Aug 2022 at 22:08, Richard Damon wrote:
>
> On 8/6/22 12:01 AM, Chris Angelico wrote:
> > On Sat, 6 Aug 2022 at 13:54, Dan Stromberg wrote:
> >> On Fri, Aug 5, 2022 at 12:54 PM Grant Edwards
> >> wrote:
> >>
> >>> In C, this doesn't do what it looks like it's supposed to do.
> >>>
> >>
On 8/6/22 12:01 AM, Chris Angelico wrote:
On Sat, 6 Aug 2022 at 13:54, Dan Stromberg wrote:
On Fri, Aug 5, 2022 at 12:54 PM Grant Edwards
wrote:
In C, this doesn't do what it looks like it's supposed to do.
if (foo)
do_this();
and_this();
then_do_this();
It's been quit
On Sat, 6 Aug 2022 at 13:54, Dan Stromberg wrote:
>
> On Fri, Aug 5, 2022 at 12:54 PM Grant Edwards
> wrote:
>
> > In C, this doesn't do what it looks like it's supposed to do.
> >
> >if (foo)
> > do_this();
> > and_this();
> >then_do_this();
> >
> It's been quite a while since
On Fri, Aug 5, 2022 at 12:54 PM Grant Edwards
wrote:
> In C, this doesn't do what it looks like it's supposed to do.
>
>if (foo)
> do_this();
> and_this();
>then_do_this();
>
It's been quite a while since I used C, but with the right compiler
flag(s), I think this may be a thing
On Fri, 5 Aug 2022 08:34:45 +0100, ojomooluwatolami675 wrote:
> Hello, I’m new to learning python and I stumbled upon a question nested
> loops. This is the question below. Can you please how they arrived at 9
> as the answer. Thanks
>
> var = 0 for i in range(3):
> for j
I had considered that, Dave. Albeit others did at least put in some
three-dot markers to show there was other code between the three lines
shown.
But the same silly argument they used applies elsewhere. Consider nested
calls like:
Delta(Gamma(Beta(Alpha)))
Now say one of those functions takes
On 06/08/2022 11.41, avi.e.gr...@gmail.com wrote:
> I wonder if someone is pulling our leg as they are sending from an invalid
> email address of "GB " which is a bit sick.
There are a number of folk who use evidently false email addresses - the
OP's had me amused.
Such 'hiding' is a matter for t
On Fri, Aug 5, 2022 at 12:30 PM GB wrote:
> On 05/08/2022 08:56, Frank Millman wrote:
>
> > BTW, there is an indentation error in your original post - line 5 should
> > line up with line 4.
>
> As a Python beginner, I find that Python is annoyingly picky about
> indents. And, the significance of
r at least that they have
spent any serious time learning.
-Original Message-
From: Python-list On
Behalf Of GB
Sent: Friday, August 5, 2022 5:57 AM
To: python-list@python.org
Subject: Re: Trying to understand nested loops
On 05/08/2022 08:56, Frank Millman wrote:
> BTW, there is an inde
On 06/08/2022 10.50, Dan Stromberg wrote:
> On Fri, Aug 5, 2022 at 12:35 AM wrote:
...
> Of if you don't have (or want) a debugger, you could change it to:
>
> var = 0
> for i in range(3):
> print('i is', i)
> for j in range(-2,-7,-2):
> print('j is', j)
> var += 1
> print(var)
>
On Fri, Aug 5, 2022 at 12:35 AM wrote:
> Hello, I’m new to learning python and I stumbled upon a question nested
> loops. This is the question below. Can you please how they arrived at 9 as
> the answer. Thanks
>
> var = 0
> for i in range(3):
> for j in range(-2,-
On 8/5/22 03:56, GB wrote:
> On 05/08/2022 08:56, Frank Millman wrote:
>
>> BTW, there is an indentation error in your original post - line 5
>> should line up with line 4.
>
> As a Python beginner, I find that Python is annoyingly picky about
> indents. And, the significance of indents is a bi
On 2022-08-05, GB wrote:
>> BTW, there is an indentation error in your original post - line 5
>> should line up with line 4.
>
> As a Python beginner, I find that Python is annoyingly picky about
> indents. And, the significance of indents is a bit of a minefield for
> beginners.
As a C begin
On 05/08/2022 08:56, Frank Millman wrote:
BTW, there is an indentation error in your original post - line 5 should
line up with line 4.
As a Python beginner, I find that Python is annoyingly picky about
indents. And, the significance of indents is a bit of a minefield for
beginners.
For
ojomooluwatolami...@gmail.com wrote at 2022-8-5 08:34 +0100:
>Hello, I’m new to learning python and I stumbled upon a question nested loops.
For future, more complex, questions of this kind,
you might have a look at the module `pdb` in Python's runtime library.
It implements a debugg
It’s also a poor code example. Doing a pointless double loop is not good
instructional practice, especially when simpler alternatives exist. e.g.
for i in range(3):
for j in range(-2.-7,-2):
print(i +j )
—
Gerard Weatherby | Application Architect NMRbox | NAN | Department of Molecular
Biol
On 05Aug2022 09:47, Lars Liedtke wrote:
>this looks to me like it might be a piece of homework, as it would be
>given by teachers or professors.
>
>This list has got the rule, that members do not solve other's
>homework. Because very often homework is meant to sit down and think
>about it.
Ver
On 2022-08-05 9:34 AM, ojomooluwatolami...@gmail.com wrote:
Hello, I’m new to learning python and I stumbled upon a question nested loops.
This is the question below. Can you please how they arrived at 9 as the answer.
Thanks
var = 0
for i in range(3):
for j in range(-2,-7,-2):
var
um 09:34 schrieb ojomooluwatolami...@gmail.com:
Hello, I’m new to learning python and I stumbled upon a question nested loops.
This is the question below. Can you please how they arrived at 9 as the answer.
Thanks
var = 0
for i in range(3):
for j in range(-2,-7,-2):
var += 1
prin
Hello, I’m new to learning python and I stumbled upon a question nested loops.
This is the question below. Can you please how they arrived at 9 as the answer.
Thanks
var = 0
for i in range(3):
for j in range(-2,-7,-2):
var += 1
print(var)
Sent from my iPhone
--
https
On 4/21/22 15:00, Greg Ewing wrote:
On 20/04/22 10:57 pm, Sam Ezeh wrote:
Has anyone here used or attempted to use a nested class inside an enum?
If so, how did you find it? (what did you expect to happen and did
your expectations align with resulting behaviour etc.)
That's a pretty
On 20/04/22 10:57 pm, Sam Ezeh wrote:
Has anyone here used or attempted to use a nested class inside an enum?
If so, how did you find it? (what did you expect to happen and did
your expectations align with resulting behaviour etc.)
That's a pretty open-ended question. Is there something
Hello everyone,
Has anyone here used or attempted to use a nested class inside an enum?
If so, how did you find it? (what did you expect to happen and did
your expectations align with resulting behaviour etc.)
Here are two examples describing the situation I'm talking about
```
class
On 11/12/21, Mladen Gogala via Python-list wrote:
> On Thu, 11 Nov 2021 17:22:15 +1100, Chris Angelico wrote:
>
>> Threads aren't the point here - signals happen immediately.
>
> [snip: description of POSIX signals]
>
> BTW, that's the case on both Unix/Linux systems and Windows systems.
Windows
On Sun, Nov 14, 2021 at 4:42 AM Mladen Gogala via Python-list
wrote:
>
> On Thu, 11 Nov 2021 17:22:15 +1100, Chris Angelico wrote:
>
> > Threads aren't the point here - signals happen immediately.
>
> Actually, signals are not delivered immediately. Signals are delivered
> the next time the proces
On Thu, 11 Nov 2021 17:22:15 +1100, Chris Angelico wrote:
> Threads aren't the point here - signals happen immediately.
Actually, signals are not delivered immediately. Signals are delivered
the next time the process gets its turn on CPU. The process scheduler
will make process runnable and the
Às 06:22 de 11/11/21, Chris Angelico escreveu:
> On Thu, Nov 11, 2021 at 5:01 PM Jon Ribbens via Python-list
> wrote:
>>
>> On 2021-11-10, Paulo da Silva wrote:
>>> Hi!
>>>
>>> How do I handle a SIGINT (or any other signal) avoid nesting?
>>
>> I don't think you need to. Python will only call sig
On Thu, Nov 11, 2021 at 5:01 PM Jon Ribbens via Python-list
wrote:
>
> On 2021-11-10, Paulo da Silva wrote:
> > Hi!
> >
> > How do I handle a SIGINT (or any other signal) avoid nesting?
>
> I don't think you need to. Python will only call signal handlers in
> the main thread, so a handler can't b
Às 21:55 de 10/11/21, Jon Ribbens escreveu:
> On 2021-11-10, Paulo da Silva wrote:
>> Hi!
>>
>> How do I handle a SIGINT (or any other signal) avoid nesting?
>
> I don't think you need to. Python will only call signal handlers in
> the main thread, so a handler can't be executed while another han
Hi!
How do I handle a SIGINT (or any other signal) avoid nesting?
Does this work?
class STATUS:
InInt=False
def SIGINT_handler(sn,f):
if STATUS.InInt: return
STATUS.InInt=True
process_int()
STATUS.InInt=False
Thanks for any suggestions.
Paulo
--
https:/
On 2021-11-10, Paulo da Silva wrote:
> Hi!
>
> How do I handle a SIGINT (or any other signal) avoid nesting?
I don't think you need to. Python will only call signal handlers in
the main thread, so a handler can't be executed while another handler
is running anyway.
--
https://mail.python.org/mai
George Fischhof writes:
> George Fischhof ezt írta (időpont: 2021. aug. 29., V,
> 21:27):
>
>>
>>
>> Loris Bennett ezt írta (időpont: 2021. aug.
>> 26., Cs, 16:02):
>>
>>> George Fischhof writes:
>>>
>>> [snip (79 lines)]
>>>
>>> >> > Hi,
>>> >> >
>>> >> > Also you can give a try to click and
George Fischhof ezt írta (időpont: 2021. aug. 29., V,
21:27):
>
>
> Loris Bennett ezt írta (időpont: 2021. aug.
> 26., Cs, 16:02):
>
>> George Fischhof writes:
>>
>> [snip (79 lines)]
>>
>> >> > Hi,
>> >> >
>> >> > Also you can give a try to click and / or typer packages.
>> >> > Putting args
Loris Bennett ezt írta (időpont: 2021. aug.
26., Cs, 16:02):
> George Fischhof writes:
>
> [snip (79 lines)]
>
> >> > Hi,
> >> >
> >> > Also you can give a try to click and / or typer packages.
> >> > Putting args into environment variables can be a solution too
> >> > All of these depends on s
George Fischhof writes:
[snip (79 lines)]
>> > Hi,
>> >
>> > Also you can give a try to click and / or typer packages.
>> > Putting args into environment variables can be a solution too
>> > All of these depends on several things: personal preferences, colleagues
>> /
>> > firm standards, the p
021 at 11:54:00 UTC+2, Loris Bennett wrote:
> >> >> Hi,
> >> >>
> >> >> TL;DR:
> >> >>
> >> >> If I have a command-line argument for a program, what is the best way
> >> >> of making this available to a deeply-nested[1] fu
t; >>
>> >> If I have a command-line argument for a program, what is the best way
>> >> of making this available to a deeply-nested[1] function call without
>> >> passing the parameter through every intermediate function?
>> >
>> > To not
am, what is the best way
> >> of making this available to a deeply-nested[1] function call without
> >> passing the parameter through every intermediate function?
> >
> > To not pass arguments you need shared state ("global variables"): and
> > option
Hi,
TL;DR:
If I have a command-line argument for a program, what is the best way
of making this available to a deeply-nested[1] function call without
passing the parameter through every intermediate function?
Long version:
If I have, say, a command-line program to send an email with a
Julio Di Egidio writes:
> On Friday, 20 August 2021 at 11:54:00 UTC+2, Loris Bennett wrote:
>> Hi,
>>
>> TL;DR:
>>
>> If I have a command-line argument for a program, what is the best way
>> of making this available to a deeply-nested[1] function
If I may, a couple of items of list-etiquette (polite behavior), as I
understand them:
1 please reply to the list (cf only myself) because @Mats (who responded
earlier) and others on this list are much smarter than me, and might be
able to help you more quickly
2 top-posting seems to take the fo
On 10/18/20 2:09 PM, Shaozhong SHI wrote:
> Even worse is that, in some cases, an addition called serviceRatings as a
> key occur with new data unexpectedly.
>
> How to produce a robust Python/Panda script to coping with all these?
>
> Regards,
>
> David
>
> u'historicRatings': [{u'overall': {u
On 19/10/2020 09:09, Shaozhong SHI wrote:
Even worse is that, in some cases, an addition called serviceRatings as a
key occur with new data unexpectedly.
"Even worse" than what?
Do you need to keep a list of acceptable/applicable/available keys?
(and reject or deal with others in some alternat
Even worse is that, in some cases, an addition called serviceRatings as a
key occur with new data unexpectedly.
How to produce a robust Python/Panda script to coping with all these?
Regards,
David
u'historicRatings': [{u'overall': {u'keyQuestionRatings': [{u'name':
u'Safe', u'rating': u'Require
Thank you for the help! Based on your response/recommendation, I am
thinking that my entire approach to solving my problem is very poor. I am
trying to pull slices from a dataframe, store them in a nested dictionary,
retrieve them, perform calculations, store the results in the same nested
Aaron wrote:
> When creating a nested dictionary of dataframes, how can I name a
> dictionary based on a list name of the dataframe?
>
> Given the following:
>
> # START CODE
> import pandas as pd
>
> cars = {'Brand': ['Honda Civic',
When creating a nested dictionary of dataframes, how can I name a
dictionary based on a list name of the dataframe?
Given the following:
# START CODE
import pandas as pd
cars = {'Brand': ['Honda Civic','Toyota Corolla'],
'Price': [22000,2500
Hi All,
I am new to python.
I have a irregular nested lists in a list. Please help me to iterate through
each element.
Thanks much in advance.
Sample Ex
aList = [[2,'jkj'],[],[],['kite',88,'ooo','pop','push','pull'],['hello'
sinnd...@gmail.com writes:
> Hi All,
> I am new to python.
> I have a irregular nested lists in a list.
> Please help me to iterate through each element.
>
> Thanks much in advance.
>
> Sample Ex
>
> aList = [[2,'jkj'],[],[],['kite',88,'o
On Fri, Mar 6, 2020 at 6:55 AM Pieter van Oostrum
wrote:
> sinnd...@gmail.com writes:
>
> > Hi All,
> > I am new to python.
> > I have a irregular nested lists in a list.
> > Please help me to iterate through each element.
> >
> > Thanks much in adva
A better way would be to just do
nestedl = [[2], [], [], [l, b, n]]#nested list
for a in nestedl: #taking all the sublist
for b in a: #iterating through the sub
print(b)
Though it is easy the only limitation is that it works only if the elements are
lists. Which
Hi All,
I am new to python.
I have a irregular nested lists in a list. Please help me to iterate through
each element.
Thanks much in advance.
Sample Ex
aList = [[2,'jkj'],[],[],['kite',88,'ooo','pop','push','pull'],['hello'
A better way would be to just do
nestedl = [[2], [], [], [l, b, n]]#nested list
for a in nestedl: #taking all the sublist
for b in a: #iterating through the sub
print(b)
Though it is easy the only limitation is that it works only if the elements are
lists. Which
On Fri, Mar 6, 2020 at 6:55 AM Pieter van Oostrum
wrote:
> sinnd...@gmail.com writes:
>
> > Hi All,
> > I am new to python.
> > I have a irregular nested lists in a list.
> > Please help me to iterate through each element.
> >
> > Thanks much in adva
sinnd...@gmail.com writes:
> Hi All,
> I am new to python.
> I have a irregular nested lists in a list.
> Please help me to iterate through each element.
>
> Thanks much in advance.
>
> Sample Ex
>
> aList = [[2,'jkj'],[],[],['kite',88,'o
On Fri, Mar 6, 2020 at 6:55 AM Pieter van Oostrum
wrote:
> sinnd...@gmail.com writes:
>
> > Hi All,
> > I am new to python.
> > I have a irregular nested lists in a list.
> > Please help me to iterate through each element.
> >
> > Thanks much in adva
Hi All,
I am new to python.
I have a irregular nested lists in a list. Please help me to iterate through
each element.
Thanks much in advance.
Sample Ex
aList = [[2,'jkj'],[],[],['kite',88,'ooo','pop','push','pull'],['hello'
A better way would be to just do
nestedl = [[2], [], [], [l, b, n]]#nested list
for a in nestedl: #taking all the sublist
for b in a: #iterating through the sub
print(b)
Though it is easy the only limitation is that it works only if the elements are
lists. Which
sinnd...@gmail.com writes:
> Hi All,
> I am new to python.
> I have a irregular nested lists in a list.
> Please help me to iterate through each element.
>
> Thanks much in advance.
>
> Sample Ex
>
> aList = [[2,'jkj'],[],[],['kite',88,'o
On Fri, Mar 6, 2020 at 6:55 AM Pieter van Oostrum
wrote:
> sinnd...@gmail.com writes:
>
> > Hi All,
> > I am new to python.
> > I have a irregular nested lists in a list.
> > Please help me to iterate through each element.
> >
> > Thanks much in adva
A better way would be to just do
nestedl = [[2], [], [], [l, b, n]]#nested list
for a in nestedl: #taking all the sublist
for b in a: #iterating through the sub
print(b)
Though it is easy the only limitation is that it works only if the elements
are lists. Which we
sinnd...@gmail.com writes:
> Hi All,
> I am new to python.
> I have a irregular nested lists in a list.
> Please help me to iterate through each element.
>
> Thanks much in advance.
>
> Sample Ex
>
> aList = [[2,'jkj'],[],[],['kite',88,'o
Hi All,
I am new to python.
I have a irregular nested lists in a list.
Please help me to iterate through each element.
Thanks much in advance.
Sample Ex
aList = [[2,'jkj'],[],[],['kite',88,'ooo','pop','push','pull'],['h
have tried everything in my knowledge, but cannot fix the problem.
Thanks for any help in advance.
for x in range ( 0, 10):
stars = 'x'
count = 0
while count < x:
stars = stars + 'x'
count = count + 1
print (stars)
These loops are serial, ie one after the other
cannot fix the problem.
Thanks for any help in advance.
for x in range ( 0, 10):
stars = 'x'
count = 0
while count < x:
stars = stars + 'x'
count = count + 1
print (stars)
These loops are serial, ie one after the other, and not "nested" (one
'in
count < x:
stars = stars + 'x'
count = count + 1
print (stars)
These loops are serial, ie one after the other, and not "nested" (
On 1/26/20 6:11 PM, Greg Ewing wrote:
On 27/01/20 4:15 am, ferzan saglam wrote:
for x in range ( 0, 10):
stars = 'x'
count = 0
By the way, this 'for' loop is unnecessary. The end result is just to
give initial values to three names. You don't need a loop at all for
that, just three assign
On 27/01/20 4:15 am, ferzan saglam wrote:
for x in range ( 0, 10):
stars = 'x'
count = 0
By the way, this 'for' loop is unnecessary. The end result is just to
give initial values to three names. You don't need a loop at all for
that, just three assignment statements.
mes (for starting values of count = 0, 1, 2, 3, 4,
5, 6, 7, 8
Think about what you wanted to do and what the code actually did.
The first for x in range (0, 10) doesn't really do what I think you
wanted, did you mean for the second loop to be nested in it?
If you do nest the seco
On Sunday, January 26, 2020 at 3:26:40 PM UTC, Dan Purgert wrote:
> -BEGIN PGP SIGNED MESSAGE-
> Hash: SHA256
>
> ferzan saglam wrote:
> > Hello people, I have written the code below which works fine, but it
> > has one small problem. Instead of printing one (x) on the first line,
> > it p
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA256
ferzan saglam wrote:
> Hello people, I have written the code below which works fine, but it
> has one small problem. Instead of printing one (x) on the first line,
> it prints two.
> I have tried everything in my knowledge, but cannot fix the problem
Hello people, I have written the code below which works fine, but it has one
small problem. Instead of printing one (x) on the first line, it prints two.
I have tried everything in my knowledge, but cannot fix the problem.
Thanks for any help in advance.
for x in range ( 0, 10):
On Tuesday, 3 December 2019 23:48:21 UTC+8, Peter Otten wrote:
> A S wrote:
>
> > On Tuesday, 3 December 2019 01:01:25 UTC+8, Peter Otten wrote:
> >> A S wrote:
> >>
> >> I think I've seen this question before ;)
> >>
> >> > I a
-problem or assignment. (in which case, we'd appreciate
> being told that you/OP is asking for help with "homework")
>
>
> >> I am trying to extract all strings in nested parentheses (along with the
> >> parentheses itself) in my .txt file. P
A S wrote:
> On Tuesday, 3 December 2019 01:01:25 UTC+8, Peter Otten wrote:
>> A S wrote:
>>
>> I think I've seen this question before ;)
>>
>> > I am trying to extract all strings in nested parentheses (along with
>> > the parentheses i
On Tuesday, 3 December 2019 01:01:25 UTC+8, Peter Otten wrote:
> A S wrote:
>
> I think I've seen this question before ;)
>
> > I am trying to extract all strings in nested parentheses (along with the
> > parentheses itself) in my .txt file. Please see the sample .
lp with "homework")
I am trying to extract all strings in nested parentheses (along with the
parentheses itself) in my .txt file. Please see the sample .txt file that
I have used in this example here:
(https://drive.google.com/open?id=1UKc0ZgY9Fsz5O1rSeBCLqt5dwZkMaQgr).
I have trie
A S wrote:
I think I've seen this question before ;)
> I am trying to extract all strings in nested parentheses (along with the
> parentheses itself) in my .txt file. Please see the sample .txt file that
> I have used in this example here:
> (https://drive.g
I am trying to extract all strings in nested parentheses (along with the
parentheses itself) in my .txt file. Please see the sample .txt file that I
have used in this example here:
(https://drive.google.com/open?id=1UKc0ZgY9Fsz5O1rSeBCLqt5dwZkMaQgr).
I have tried and done up three different
1) <= g[-1]:
if (Temp[i]['cost'][j] <= (run_parameters.PSD): -- When
this condition is true i want to break the nested loop and start from the begining
served_count +=1
A.T[i]["First_index"]= s
for s in range(g[0], g[-1]):
> if (s+req_slots[j]-1) <= g[-1]:
> if (Temp[i]['cost'][j] <= (run_parameters.PSD): -- When
> this condition is true i want to break the nested loop and start from the
> begining
>
if (s+req_slots[j]-1) <= g[-1]:
> if (Temp[i]['cost'][j] <= (run_parameters.PSD): --
> When this condition is true i want to break the nested
> loop and start from the begining
>
Temp[i]['cost'][j] <= (run_parameters.PSD): -- When
this condition is true i want to break the nested loop and start from the
begining
served_count +=1
A.T[i]["First_index"]= s
A.T[i]["Last_index"]= s+re
Neal Becker wrote:
but it does violate the principle "Exceptions should
be used for exceptional conditions).
Python doesn't really go in for that philosophy.
Exceptions are often used for flow control, e.g.
StopIteration.
--
Greg
--
https://mail.python.org/mailman/listinfo/python-list
On 2018-09-26 21:06, Mark Lawrence wrote:
>
> To me the Ned Batchelder presentation
> https://www.youtube.com/watch?v=EnSu9hHGq5o "Loop like a Native" is the
> definitive way on how to deal with loops in Python.
>
Hear, hear.
Great talk.
--
https://mail.python.org/mailman/listinfo/python-list
in range(10):
>>> print(f'\tj: {j}')
>>> for k in range(10):
>>> print(f'\t\tk: {k}')
>>>
>>> if condition(i, j, k):
>>> raise Break
>>> except Break:
>>> pass
>>>
>>
>> For all such
Remember the requirement is very simple, to 'break out of a nested loop'
(and usually this will be to break out of the outermost loop). What
you're looking is a statement which is a minor variation on 'break'.
Which is exactly what it does. "raise Break" is
On Wednesday, September 26, 2018 at 12:50:20 AM UTC-7, vito.d...@gmail.com
wrote:
> I have "abused" the "else" clause of the loops to makes a break "broke" more
> loops
I did this once upon a time. In recent years, when I start writing tricky
nested loop
On 26/09/18 08:50, vito.detul...@gmail.com wrote:
Hi
Today I've added a couple of lines in my source code, and I'm very ashamed of
it.
it "runs", and I know what it does (for now), but it's "too clever".
I have "abused" the "else" clause of the loops to makes a break "broke" more
loops
f
vito.detul...@gmail.com wrote:
> Hi
> Today I've added a couple of lines in my source code, and I'm very ashamed
> of it. it "runs", and I know what it does (for now), but it's "too
> clever". I have "abused" the "else" clause of the loops to makes a break
> "broke" more loops
>
>
> for i in
On Wed, Sep 26, 2018 at 5:56 PM wrote:
>
> Hi
> Today I've added a couple of lines in my source code, and I'm very ashamed of
> it.
> it "runs", and I know what it does (for now), but it's "too clever".
> I have "abused" the "else" clause of the loops to makes a break "broke" more
> loops
>
>
>
Hi
Today I've added a couple of lines in my source code, and I'm very ashamed of
it.
it "runs", and I know what it does (for now), but it's "too clever".
I have "abused" the "else" clause of the loops to makes a break "broke" more
loops
for i in range(10):
print(f'i: {i}')
f
Ethan Furman writes:
> I'm asking because in doing some work on Enum it became apparent to me
> that having nested classes was not a smooth, satisfying experience,
> and I'm considering treating them the same way as methods (they will
> no longer be converted into members
Greetings!
So the stdlib Enum has been around for a few years now. Has anyone
written an enum that either had types as members:
class Types(Enum):
Int = int
Str = str
or that had nested classes:
class Types(Enum):
class Contained(Enum):
circle = 1
Thanks. As I can see python 3.7 is the best option.
Thank you very very muchs for the code as well.
Best regards.
--
https://mail.python.org/mailman/listinfo/python-list
1 - 100 of 2076 matches
Mail list logo