?
-Original Message-
From: ETEM ÇETİN TOPTANİ
To: python-list@python.org
Sent: Tue, Feb 8, 2022 3:52 am
Subject: Kind Remainder: How do Practitioners Approach towards Requirements
Engineering?
Dear Sir or Madam,
We prepared a short survey to understand practitioners’ perspectives
towards the
Thank you for clarifying that. Now on to getting the iterator from the method.
Jen
Feb 8, 2022, 18:10 by pyt...@mrabarnett.plus.com:
> On 2022-02-09 01:12, Jen Kris via Python-list wrote:
>
>> I am using the Python C API to load the Gutenberg corpus from the nltk
>> l
lib/x86_64-linux-gnu/libpython3.8.so.1.0
My guess is the problem is in Py_BuildValue, which returns a pointer but it may
not be constructed correctly. I also tried it with "O" and it doesn't segfault
but it returns 0x0.
I'm new to using the C API. Thanks for any help.
Jen
--
https://mail.python.org/mailman/listinfo/python-list
/vrut/python/ext/buildValue.html, PyBuildValue
"builds a tuple only if its format string contains two or more format units"
and that doc contains examples.
Feb 9, 2022, 16:52 by songofaca...@gmail.com:
> On Thu, Feb 10, 2022 at 9:42 AM Jen Kris via Python-list
> wrote:
>
_Call accept tuple, not str.
>
>
> https://docs.python.org/3/c-api/call.html#c.PyObject_Call
>
>>
>> Feb 9, 2022, 16:52 by songofaca...@gmail.com:
>>
>> On Thu, Feb 10, 2022 at 9:42 AM Jen Kris via Python-list
>> wrote:
>>
>>
>> I have everythi
ple/amliu/vrut/python/ext/buildValue.html,
>> PyBuildValue "builds a tuple only if its format string contains two or more
>> format units" and that doc contains examples.
>>
>>
>> Yes, and PyObject_Call accept tuple, not str.
>>
>>
>> ht
nhangeer
about <https://compileralchemy.github.io/> | blog
<https://www.pythonkitchen.com>
github <https://github.com/Abdur-RahmaanJ>
Mauritius
--
https://mail.python.org/mailman/listinfo/python-list
--
https://mail.python.org/mailman/listinfo/python-list
if (pSents ==
> NULL) return NULL`)
> Then Python show the exception and traceback for you.
>
> --
> Inada Naoki
>
--
https://mail.python.org/mailman/listinfo/python-list
things.
But of course, performance is not the only consideration, as per Chris
Angelico's answer.
Best wishes
Rob Cliffe
--
https://mail.python.org/mailman/listinfo/python-list
turn NULL (e.g. `if (pSents ==
> NULL) return NULL`)
> Then Python show the exception and traceback for you.
>
> --
> Inada Naoki
>
--
https://mail.python.org/mailman/listinfo/python-list
erday.
Thanks much for your help.
Jen
Feb 9, 2022, 18:43 by pyt...@mrabarnett.plus.com:
> On 2022-02-10 01:37, Jen Kris via Python-list wrote:
>
>> I'm using Python 3.8 so I tried your second choice:
>>
>> pSents = PyObject_CallFunctionObjArgs(pSentMod, pListItem);
>
Thank you for that suggestion. It allowed me to replace six lines of code with
one. :)
Feb 10, 2022, 12:43 by pyt...@mrabarnett.plus.com:
> On 2022-02-10 20:00, Jen Kris via Python-list wrote:
>
>> With the help of PyErr_Print() I have it solved. Here is the final code
which
circumstances.
--
https://mail.python.org/mailman/listinfo/python-list
: NArshad
To: python-list@python.org
Sent: Thu, Feb 10, 2022 1:40 am
Subject: How to solve the given problem?
Assume that there is a pattern of feeding for a special fish in a day (10 hours
a day) as below:
150 100 30 30 30 20 20 10
5 5
dictionary type, enclosed
with curly braces. I found PyObject_GenericGetDict
(https://docs.python.org/3.8/c-api/object.html) but I haven't found any
documentation or explanation of how it works.
Is PyObject_GenericGetDict what I need, or is there another way to do it?
Thanks,
Jen
--
https://mail.python.org/mailman/listinfo/python-list
Yes, that works. This is my first day with C API dictionaries. Now that
you've explained it, it makes perfect sense. Thanks much.
Jen
Feb 14, 2022, 17:24 by ros...@gmail.com:
> On Tue, 15 Feb 2022 at 12:07, Jen Kris via Python-list
> wrote:
>
>>
>> I created a
sleeping at the same
time may be worse!
I note badly defined questions get horrible answers. Mine included.
-Original Message-
From: Alan Gauld
To: python-list@python.org
Sent: Sat, Feb 19, 2022 7:33 am
Subject: Fwd: Re: Long running process - how to speed up?
On 19/02/2022 11:28, Shaozhong
://www.pythonkitchen.com>
github <https://github.com/Abdur-RahmaanJ>
Mauritius
--
https://mail.python.org/mailman/listinfo/python-list
--
https://mail.python.org/mailman/listinfo/python-list
Wichmann
Cc: python-list@python.org
Sent: Sun, Feb 20, 2022 1:05 pm
Subject: Re: Long running process - how to speed up?
On Sat, 19 Feb 2022 at 19:44, Mats Wichmann wrote:
> On 2/19/22 05:09, Shaozhong SHI wrote:
> > Can it be divided into several processes?
> > Regards,
> > Da
be able to make many such
pseudo-anonymous functions, in the end, there can only be one.
-Original Message-
From: Greg Ewing
To: python-list@python.org
Sent: Sun, Feb 20, 2022 5:17 pm
Subject: Re: Why does not Python accept functions with no names?
On 21/02/22 6:27 am, Abdur-Rahmaan
the user that in case they actually
wanted a real function, it is now mxyzptlk666 ...
-Original Message-----
From: Eryk Sun
To: python-list@python.org
Sent: Mon, Feb 21, 2022 2:35 am
Subject: Re: Why does not Python accept functions with no names?
On 2/20/22, Greg Ewing wrote:
>
> BTW,
7;, 'ccc'], ['fff', 'ggg']]
As shown the list comprehension itself is not returning anything of value and
need not be assigned to anything. But it then generally is set to autoprint and
that can be supressed by assigning the value to _ or anything you can ignore.
I
e we start.
Of course, it can change in the seconds that follow. But it's too much pure
logic at work.
--
https://mail.python.org/mailman/listinfo/python-list
--
https://mail.python.org/mailman/listinfo/python-list
27;, 'ggg', 666, 'e', 'u', 'a', 'o', 'i']
The quest for a one-liner sometimes forgets that a typical function call is
also a one-liner, with the work hidden elsewhere, often in a module written in
python or mainly in C and so on. I suspect m
Shaozhong SHI wrote:
> Can it be divided into several processes?
I'd do it like this:
from time import sleep
from threading import Thread
t = Thread(target=lambda: sleep(1))
t.run()
# do your work here
t.wait()
--
https://mail.python.org/mailman/listinfo/python-list
,
Richard
--
https://mail.python.org/mailman/listinfo/python-list
we check for the ability to do it
> before we start.
Nothing wrong with checking before.
> Of course, it can change in the seconds that follow. But it's too much pure
> logic at work.
No. It's the correct way of doing it.
--
https://mail.python.org/mailman/listinfo/python-list
tion.
> So it detected that there is or there is no internet ...
Your application obviously needs to make a certain network connection. Why
don't you just check if the connection can be made? Why would you care if it's
via cable or Wifi?
--
https://mail.python.org/mailman/listinfo/python-list
ache.append()
because _update() can ever only run in one thread at a time. But maybe I'm
overlooking something.
--
https://mail.python.org/mailman/listinfo/python-list
se, so
that some screens displayed error messages for a minute or two. Nobody cares
but my pride was piqued and the error logs filled up.
I've had my proposed solution running for a few days now without errors. For me
that's enough but I wanted to ask you guys if I made some logical mistakes.
--
https://mail.python.org/mailman/listinfo/python-list
a future update.
I don't think that's a problem. If it turns out to be one I'll create a copy of
the data while I hold the lock and pass that back.
>
--
https://mail.python.org/mailman/listinfo/python-list
C. It may well be optimized in some
places but there are constraints that may well make it hard to optimize
compared to some other implementation without those constraints. In particular,
it interfaces with standard Python data structures at times such as when
initializing from a Python List,
used by so many languages cannot be made part of python such
as a vector/array that holds exactly one kind of data structure and not force
use of things like a list when that is more than is needed?
-Original Message-
From: Grant Edwards
To: python-list@python.org
Sent: Fri, Feb 25, 20
other scientific and
machine learning modules. Of course not everyone needs or even wants this. Many
simply use base Python techniques even if they are low for larger amounts of
data.
--
https://mail.python.org/mailman/listinfo/python-list
g on the same language, Python?
-Original Message-----
From: Chris Angelico
To: python-list@python.org
Sent: Fri, Feb 25, 2022 2:58 pm
Subject: Re: C is it always faster than nump?
On Sat, 26 Feb 2022 at 06:44, Avi Gross via Python-list
wrote:
>
> I agree with Richard.
>
> Some people m
problems.
-Original Message-
From: Chris Angelico
To: python-list@python.org
Sent: Fri, Feb 25, 2022 11:16 pm
Subject: Re: C is it always faster than nump?
On Sat, 26 Feb 2022 at 14:35, Avi Gross via Python-list
wrote:
> But with numpy and more available anyway, it may not be necessary
Chris Angelico wrote:
> Every language learns from every other.
Except Visual Basic, which didn't learn anything from anywhere, and all that
can be learned from it is how not to do it. Ugh.
--
https://mail.python.org/mailman/listinfo/python-list
)-338-1439 <786-338-1439>
[image: LinkedIn] <https://www.linkedin.com/company/applovin> [image:
Twitter] <https://twitter.com/AppLovin> [image: Facebook]
<https://facebook.com/AppLovin> [image: Instagram]
<https://www.instagram.com/applovin/>
[image: AppLovin] <https://www.applovin.com/>
--
https://mail.python.org/mailman/listinfo/python-list
;? [CA= Sender appName] file /var/log/appName/appName.log
> >
> >My end goal is really to get just a working python logging ->
> >var/log/appname/appname.log again so glad to just be pointed in the right
> >direction if way off base.
>
>
> --
> Wulfra
-
https://mail.python.org/mailman/listinfo/python-list
o JSON or String.
I've done exactly this. Since my data was strictly ASCII I decided to go for
JSON. But in the end you're the only one who can decide this because only you
know the data. That's why you won't find any hard and fast rule for this.
--
https://mail.python.org/mailman/listinfo/python-list
acters in utf8mb4 character set.
--
https://mail.python.org/mailman/listinfo/python-list
t;us-east-2"), ("Windows",
"us-east-1"), "Windows", "us-east-2')]
The lists can be different lengths or can be 0 length. Tried a few
different things with itertools but have not got just what I need.
TIA!
--
https://mail.python.org/mailman/listinfo/python-list
ind for future questions.
--
https://mail.python.org/mailman/listinfo/python-list
ld expect as the default if you are using the C
> API.
>
> What you do not see used in the SyslogHandler() is the import syslog
> and hence its nor using openlog() etc from syslog API.
>
> Barry
>
>
>
> >hp
> >
> > --
> > _ | Peter J. Holz
On 03/03/2022 14:07, Larry Martell wrote:
On Wed, Mar 2, 2022 at 9:42 PM Avi Gross via Python-list
wrote:
Larry,
i waited patiently to see what others will write and perhaps see if you explain
better what you need. You seem to gleefully swat down anything offered. So I am
not tempted to
It is clear that was not quite your real need.
-Original Message-
From: Larry Martell
To: Avi Gross
Cc: python-list@python.org
Sent: Thu, Mar 3, 2022 9:07 am
Subject: Re: All permutations from 2 lists
On Wed, Mar 2, 2022 at 9:42 PM Avi Gross via Python-list
wrote:
>
>
rator), and then -- if there are any elements
-- processing
the first element separately before the for-loop, which means
duplicating the loop body. You can see the whole thing gets really
ugly really quickly...
What are your thoughts? Do you agree? Or am I just not Dutch enough...?
--
https://mail.python.org/mailman/listinfo/python-list
: Chris Angelico
To: python-list@python.org
Sent: Thu, Mar 3, 2022 12:40 pm
Subject: Re: Timezone jokes (was: All permutations from 2 lists)
On Fri, 4 Mar 2022 at 03:29, Tim Chase wrote:
>
> On 2022-03-03 06:27, Grant Edwards wrote:
> > On 2022-03-03, Chris Angelico wrote:
> > &
listener on localhost:514. There are no deamons
>> listening on port 514 on my Fedora systems or mac OS.
>>
>> That is not what you would expect as the default if you are using the C
>> API.
>>
>> What you do not see used in the SyslogHandler() is the impor
ng "Re: replacing `else` with `then` in `for` and `try`".
I'm not sure any particular conclusion was reached though except that
some people think 'else' is more intuitive and some people think
'then' would be more intuitive.
--
https://mail.python.org/mailman/listinfo/python-list
age must be added to sparingly and with so many requests, perhaps
only a few non bug-fixes can seriously be considered.
-Original Message-
From: Akkana Peck
To: python-list@python.org
Sent: Thu, Mar 3, 2022 5:33 pm
Subject: Re: Behavior of the for-else construct
computermaster360 writes
Cliffe
On 03/03/2022 23:07, Avi Gross via Python-list wrote:
The drumbeat I keep hearing is that some people hear/see the same word as
implying something else. ELSE is ambiguous in the context it is used.
And naturally, since nobody desperately wants to use non-reserved keywords,
nobody seems
g keyboards is a challenge.
Back to the topic, I was thinking wickedly of a way to extend the FOR loop with
existing keywords while sounding a tad ominous is not with an ELSE but a FOR
... OR ELSE ...
-Original Message-
From: Rob Cliffe via Python-list
To: python-list@python.org
Sent:
n
NEVERTHELESS.
-Original Message-
From: Chris Angelico
To: python-list@python.org
Sent: Thu, Mar 3, 2022 7:34 pm
Subject: Re: Behavior of the for-else construct
On Fri, 4 Mar 2022 at 10:09, Avi Gross via Python-list
wrote:
>
> The drumbeat I keep hearing is that some people h
On 04/03/2022 00:34, Chris Angelico wrote:
On Fri, 4 Mar 2022 at 10:09, Avi Gross via Python-list
wrote:
The drumbeat I keep hearing is that some people hear/see the same word as
implying something else. ELSE is ambiguous in the context it is used.
What I'm hearing is that ther
On 04/03/2022 00:38, Avi Gross via Python-list wrote:
Rob,
I regularly code with lots of comments like the one you describe, or mark the
end of a region that started on an earlier screen such as a deeply nested
construct.
So do I (and not just in Python). It's good practice.
I hav
On 04/03/2022 00:43, Chris Angelico wrote:
On Fri, 4 Mar 2022 at 11:14, Rob Cliffe via Python-list
wrote:
I find it so hard to remember what `for ... else` means that on the very
few occasions I have used it, I ALWAYS put a comment alongside/below the
`else` to remind myself (and anyone
On 04/03/2022 01:44, Ethan Furman wrote:
On 3/3/22 5:32 PM, Rob Cliffe via Python-list wrote:
> There are three types of programmer: those that can count, and those
that can't.
Actually, there are 10 types of programmer: those that can count in
binary, and those that can't.
#x27;if a break occurred', then
at least only one debtor is killed, as an example to the others, and no
Exception will occur in the unlikely event of "debtors" being empty.
Happy fund-raising!
Rob Cliffe
There's something in this.
ChrisA
--
https://mail.python.org/mailman/listinfo/python-list
hen you die and it simplifies.
-Original Message-
From: Rob Cliffe via Python-list
To: python-list@python.org
Sent: Thu, Mar 3, 2022 8:41 pm
Subject: Re: Behavior of the for-else construct
On 04/03/2022 00:38, Avi Gross via Python-list wrote:
> Rob,
>
> I regularly code with l
an ELSE dangling.
-Original Message-
From: Jach Feng
To: python-list@python.org
Sent: Thu, Mar 3, 2022 9:22 pm
Subject: Re: Behavior of the for-else construct
I never feel confused by "else" because I always think it in "break...else",
not "for...else".
as discussed, you could do an IF statement to check if closet is empty but
for iterators, it gets ...
-Original Message-
From: Dieter Maurer
To: Rob Cliffe
Cc: python-list@python.org
Sent: Fri, Mar 4, 2022 2:12 am
Subject: Re: Behavior of the for-else construct
Rob Cliffe wrote at 2022-3
t be. I am not one of those that find the current
implementation to be the wrong one and will happily use it when I have code
that can be done well that way. I am just discussing the issue and wider ones.
Languages have an amazing variety of designs that fascinate me.
-Original Message
ye==4 after the
loop. The above loop would leave it as aye==None which keeps it from being
undefined. To decide if the loop ran at all would thus require further code
such as:
if aye == None:
...
Which leads me right back to wondering why the sentinel approach is so bad!
-Origi
lows
something like:
result = for ...
That might return 0 or None if it was part of the language but it is not.
Avi (my current first name)
-Original Message-
From: Om Joshi
To: Avi Gross
Cc: python-list
Sent: Fri, Mar 4, 2022 3:04 pm
Subject: Re: Behavior of the for-else constru
On 04/03/2022 20:52, Avi Gross via Python-list wrote:
I have an observation about exception handling in general. Some people use
exceptions, including ones they create and throw, for a similar idea. You might
for example try to use an exception if your first attempt fails that specifies
situations where almost all programs are found in the first component of
PATH, perhaps the exception approach is not horrible. It may even at times be
done with less coding effort than other alternatives. Not my preferred way, of
course.
-Original Message-
From: Rob Cliffe via Python-list
ing code hard for anyone else to deal with so yes, I would not
rewrite key components or do something like make new function names that point
to existing standard functions and only use the new (often not pronounceable)
names.
-Original Message-
From: Peter J. Holzer
To: pyt
On 05/03/2022 01:15, Cameron Simpson wrote:
I sort of wish it had both "used break" and "did not use break"
branches, a bit like try/except/else.
And "zero iterations".
Rob Cliffe
--
https://mail.python.org/mailman/listinfo/python-list
my part of this endless conversation may have gone a bit beyond far
enough and I await some new topics.
-Original Message-
From: Rob Cliffe via Python-list
To: python-list@python.org
Sent: Sat, Mar 5, 2022 7:15 am
Subject: Re: Behavior of the for-else construct
On 05/03/2022 01:15, Camer
To: python-list@python.org
Sent: Sat, Mar 5, 2022 1:39 pm
Subject: Re: Behavior of the for-else construct
On 04/03/2022 18.11, Peter J. Holzer wrote:
> On 2022-03-04 23:47:09 +, Avi Gross via Python-list wrote:
>> I am not sure a reply is needed, Peter, and what you say is true. But
IDLE; still the IDLE is still missing.
Please. explain to me how I can retrieve the python IDLE.
Thank You,
Deji Olofinboba
--
https://mail.python.org/mailman/listinfo/python-list
and other languages
to undergrads ;-)
-Original Message-
From: Dennis Lee Bieber
To: python-list@python.org
Sent: Sat, Mar 5, 2022 7:00 pm
Subject: Re: Behavior of the for-else construct
On Sat, 5 Mar 2022 21:40:08 + (UTC), Avi Gross
declaimed the following:
>I am not sure how we end
orrect, it has a
proper spelling. But following that reasoning, why does anyone give an email
address of john.sm...@gmail.com or jane...@yahoo.com instead of ...?
-----Original Message-
From: Peter J. Holzer
To: python-list@python.org
Sent: Sun, Mar 6, 2022 12:48 pm
Subject: Re: Behavior
, \',\', "\'Emma", "\'", \',\', "\'by", "\'", \',\',
"\'Jane", "\'", \',\', "\'Austen", "\'", \',\', "\'1816", "\'", \',\', "\'",
\']\', "\'", \']\']'
I also tried this with PyObject_CallMethodObjArgs and PyObject_Call without
success.
Thanks for any help on this.
Jen
--
https://mail.python.org/mailman/listinfo/python-list
the same way as ‘’.join, and if not then (2) how can I
strip characters from a string object in the C API?
Thanks.
Mar 6, 2022, 17:42 by pyt...@mrabarnett.plus.com:
> On 2022-03-07 00:32, Jen Kris via Python-list wrote:
>
>> I am using the C API in Python 3.8 with the nltk
The PyObject str_sentence is a string representation of a list. I need to
convert the list to a string like "".join because that's what the library call
takes.
Mar 7, 2022, 09:09 by ros...@gmail.com:
> On Tue, 8 Mar 2022 at 04:06, Jen Kris via Python-list
> wrote:
&g
e way as ‘’.join, and if not then (2) how
>> can I strip characters from a string object in the C API?
>>
> Your Python code is joining the list with a space as the separator.
>
> The equivalent using the C API is:
>
> PyObject* separator;
> PyObject*
ideas.
Jen
--
https://mail.python.org/mailman/listinfo/python-list
s.com:
> On 2022-03-12 21:24, Jen Kris via Python-list wrote:
>
>> I have a C API project where I have to slice a list into two parts.
>> Unfortunately the documentation on the slice objects is not clear enough for
>> me to understand how to do this, and I haven’t found e
pDictData, despite the name, is a list of 2-tuples where each 2-tuple is a
dictionary object and a string.
Mar 12, 2022, 13:41 by ros...@gmail.com:
> On Sun, 13 Mar 2022 at 08:25, Jen Kris via Python-list
> wrote:
>
>> PyObject* slice = PySlice_New(PyLong_FromLong(0)
;s a borked one, kaboom).
>
> ChrisA
> --
> https://mail.python.org/mailman/listinfo/python-list
>
--
https://mail.python.org/mailman/listinfo/python-list
e sequence API. In Python, you can
> write extend() as +=, indicating that you're adding something onto the
> end:
>
>>>> x = ["spam", "ham"]
>>>> x += (1, 2)
>>>> x
>>>>
> ['spam', 'ham', 1, 2]
>
> This corresponds to PySequence_InPlaceConcat, so if that's the
> behaviour you want, that would be the easiest way to do it.
>
> Based on your other comments, I would suspect that appending the
> tuples is probably what you want here?
>
> ChrisA
> --
> https://mail.python.org/mailman/listinfo/python-list
>
--
https://mail.python.org/mailman/listinfo/python-list
as its own quirks and we have adjusted our thinking multiple
times by the time welearned Python. What Paul suggests is just a convenience is
more than that. It is a variablebinding with many ramifications.
-Original Message-
From: Chris Angelico
To: python-list@python.org
Sent: Mon, Ma
carefully. Regular users may easily make mistakes for the sake of
convenience.
So I wonder if some pythonic methods fit into convenience modes or can
veer into dangerous modes. Spelling things out in full detail may be annoying
but generally safer.
--
https://mail.python.org/mailman/listinfo/python-list
n arbitrary data structure and have to
say first.next.next.next.next ...
Also noted is your use of a direct pointer had positive and also negative
ramifications to consider. It is not a synonym just for convenience.
-Original Message-----
From: Paul St George
To: python-list@python.org
S
suggestion that unless you know the code well and can be sure
you won't
corrupt things, this kind of convenient access has possible dangers.
-Original Message-
From: Greg Ewing
To: python-list@python.org
Sent: Tue, Mar 22, 2022 7:12 pm
Subject: Re: convenience
On 23/03/22 7:00 am, Avi
utube.com/watch?v=Eoh7FVR_QcM&list=PLipSv-7x4nWdPTwpZ0pDoOnGhhg3vboh5
Have a look,
Learn Python With
Pytohttps://www.youtube.com/channel/uccmxvj1uadepa1ekqqwxz4galan.vec...@gmail.com
--
https://mail.python.org/mailman/listinfo/python-list
se
it is what it
is so get over it!
-Original Message-
From: Paul St George
To: python-list@python.org
Sent: Thu, Mar 24, 2022 6:31 am
Subject: Re: for convenience
On 22/03/2022 18.04, dn wrote:
> and thank you - it is refreshing, if not enervating, to receive feedback
&
sure, you could write code that reads fileA.py and outputs fileB.py and only
run fileB through the interpreter. Yes, instead of making versions which have
all
kinds of text written in various languages, you could just have the python code
read in various files at run time or other techniques.
-
xample, which I
sometimes use in my programming, literally jumps out of the initial
language.
-Original Message-
From: Chris Angelico
To: python-list@python.org
Sent: Thu, Mar 24, 2022 1:37 pm
Subject: Re: for convenience
On Fri, 25 Mar 2022 at 04:15, Avi Gross via Python-list
wrote:
&g
for a programming class and it definitely would have been much easier to do in
Python.
-Original Message-
From: Chris Angelico
To: python-list@python.org
Sent: Thu, Mar 24, 2022 7:57 pm
Subject: Re: for convenience
On Fri, 25 Mar 2022 at 10:44, Avi Gross wrote:
> But would it
)
logger.addHandler(handler)
num = randrange(0,1000)
if num == 0:
logger.err("got zero")
else:
logger.info(f'got a positive integer: {num}')
if __name__ == "__main__":
main()
--
https://mail.python.org/mailman/listinfo/python-list
me somebody has a codebase of 15T
lines of Python code. How do you want to apply your method?
But perhaps I overlook things.
--
https://mail.python.org/mailman/listinfo/python-list
t has that method before trying to
invoke it, or you can handle exceptions generated if it doesn't.
-Original Message-
From: Kirill Ratkin via Python-list
To: python-list@python.org
Sent: Sun, Mar 27, 2022 2:29 pm
Subject: Re: How to detect an undefined method?
I just started to
ntu
for servers is that Ubuntu wants to be up to date. So Ubuntu starts
very close to Debian security wise, but will shift rapidly.
--
Cecil Westerhof
Senior Software Engineer
LinkedIn: http://www.linkedin.com/in/cecilwesterhof
--
https://mail.python.org/mailman/listinfo/python-list
;
> asyncio.run(long())
> print('after asyncio.run')
>
> The final print does not come out until after long() completes.
>
> Is there any way to do this?
> --
> https://mail.python.org/mailman/listinfo/python-list
>
--
https://mail.python.org/mailman/listinfo/python-list
19:10, Larry Martell пишет:
import asyncio
import time
async def long():
for i in range(100):
time.sleep(10)
asyncio.run(long())
print('after asyncio.run')
--
https://mail.python.org/mailman/listinfo/python-list
Hi
30.03.2022 21:44, Larry Martell пишет:
On Wed, Mar 30, 2022 at 2:40 PM Kirill Ratkin via Python-list
wrote:
Hi again,
I changed a bit your example and it works as you expected I hope.
import asyncio
async def long():
for i in range(100):
await asyncio.sleep(10
3001 - 3100 of 5713 matches
Mail list logo