name must be
hidden later. But I don't think this is the case.
The module is imported but it isn't bound to any name in the current
(global) namespace (obviously there must be some variable bound to it, but
that's probably a local variable in the importer and it isn't called
`x`). Then the object boun
thing to do is to create the venv and activate it.
hp
--
_ | Peter J. Holzer| Story must make more sense than reality.
|_|_) ||
| | | h...@hjp.at |-- Charles Stross, "Creative writing
__/ | http://www.hjp.at/ | challenge!"
signature.as
On 2022-08-22 19:27:28 -, Jon Ribbens via Python-list wrote:
> On 2022-08-22, Peter J. Holzer wrote:
> > On 2022-08-22 00:45:56 -, Jon Ribbens via Python-list wrote:
> >> With the offset though, BeautifulSoup made an arbitrary decision to
> >> use ISO-8859
o know
the the character set.
(By parsing I mean only "create a syntax tree". Obviously you have to
know the encoding to know whether to display «c3 bc» as «ü» or «Ã¼».)
hp
--
_ | Peter J. Holzer| Story must make more sense than reality.
|_|_) ||
|
On 2022-08-22 00:09:01 -, Jon Ribbens via Python-list wrote:
> On 2022-08-21, Peter J. Holzer wrote:
> > On 2022-08-20 21:51:41 -, Jon Ribbens via Python-list wrote:
> >> result = re.sub(
> >> r"""(<\s*a\s+[^>]*href\s*=
On 22/08/2022 05:30, Chris Angelico wrote:
On Mon, 22 Aug 2022 at 10:04, Buck Evan wrote:
I've had much success doing round trips through the lxml.html parser.
https://lxml.de/lxmlhtml.html
I ditched bs for lxml long ago and never regretted it.
If you find that you have a bunch of invalid
en the
constraints I think I would prefer that to using Beautiful Soup), but
getting the regexps right is not trivial, at least in the general case.
It may become a lot easier if you know that certain conventions were
followed (e.g. that ">" was always
convenient to extend/shorten/reorder a list. Otherwise you alway have to
remember add or remove a comma in the right place. (Some people
(especially SQL programmers for some reason) resorted to put the comma
at the start of each line to get around this, which is really ugly.)
hp
--
3 or 4 or maybe even 20
seconds, the producer might not even notice. (This of course depends
very much on the details which we know nothing about.)
hp
--
_ | Peter J. Holzer| Story must make more sense than reality.
|_|_) ||
| | | h...@hjp.at
e they are
busy.
hp
PS: I also agree with what others have said about the perils of
multi-threaded programming.
--
_ | Peter J. Holzer| Story must make more sense than reality.
|_|_) ||
| | | h...@hjp.at |-- Charles Stross, "Creative writing
__/
On 2022-07-29 23:24:57 +, Peter Pearson wrote:
> The following code produces a nonsense result with the input
> described below:
>
> import mailbox
> box = mailbox.Maildir("/home/peter/Temp/temp",create=False)
> x = box.values()[0]
> h = x.get(&q
The following code produces a nonsense result with the input
described below:
import mailbox
box = mailbox.Maildir("/home/peter/Temp/temp",create=False)
x = box.values()[0]
h = x.get("X-DSPAM-Factors")
print(type(h))
#
The output is the desired "str"
On 25/07/2022 02:47, Khairil Sitanggang wrote:
Regarding your comment : "
*However, usually object creation and initialization iscombined by allowing
arguments to the initializer:*" , so which one of the two classes Node1,
Node2 below is more common in practice? Option 2, I guess.
Thanks,
#
On 23/07/2022 06:28, Khairil Sitanggang wrote:
Hello Expert:
I just started using python. Below is a simple code. I was trying to check
if, say, NO1 is not in the NODELIST[:].NO
How can I achieve this purpose?
Regards,
-Irfan
class Node:
def __init__(self):
self.NO = 0
the start of the thread
(although the one by Barry has neither an In-Reply-To nor a References
header so it isn't sorted in at the correct spot).
hp
--
_ | Peter J. Holzer| Story must make more sense than reality.
|_|_) ||
| | | h...@hjp.at |-- Charl
On 20/07/2022 11:37, Chris Angelico wrote:
On Wed, 20 Jul 2022 at 18:34, Frank Millman wrote:
Hi all
C:\Users\E7280>python
Python 3.9.7 (tags/v3.9.7:1016ef3, Aug 30 2021, 20:19:38) [MSC v.1929 64
bit (AMD64)] on win32
Type "help", "copyright", "credits" or "license" for more information.
On 29/06/2022 23:17, Chris Angelico wrote:
On Thu, 30 Jun 2022 at 02:49, Johannes Bauer wrote:
But now consider what happens when we create the lambdas inside a list
comprehension (in my original I used a generator expresison, but the
result is the same). Can you guess what happens when we
hedFileHandler
(https://docs.python.org/3/library/logging.handlers.html#watchedfilehandler)
to automatically detect when a logile has been rotated.
Alternatively you can use a central logging service (like syslog) which
handles all that stuff.
hp
--
_ | Peter J. Holzer
ermail/python-list/2022-April/906045.html
(the latter also contains some prototype code).
(I apologize for not pursuing that further at the time. I wanted to
bolster that case with some real world applications, but I was a bit
swamped with Real Work™ and didn't find anything suitable.)
hp
-
n my case, as
> MRAB taught me, the proper syntax is
> self,'lname'...
There is a comma (U+002C) here ...
> self.'fname'...
And a dot (U+002E) here.
I don't think this is correct.
I would also recommend to always add a space after a comma.
hp
--
_ | Peter J. Holz
On Tue, 14 Jun 2022 00:41:07 +0200, jak wrote:
[snip]
>
> If you are interested in seeing what I called "post office bulletin"
> (English is not my language and I don't know the name, sorry), you can
> find a sample pdf (fillable) but it works badly here:
>
>
On 12/06/2022 14:40, Ayesha Tassaduq wrote:
Hi i am trying to store a text file into MongoDB but i got the error .
"failing because no such method exists." % self.__name.split(".")[-1]
TypeError: 'Collection' object is not callable. If you meant to call the
'insert' method on a 'Collection'
On 09/06/2022 00:53, Richard David wrote:
Why am I not getting debug output on my windows 10 machine:
C:\temp>\Windows\py.exe -0
-V:3.11 *Python 3.11 (64-bit)
-V:3.10 Python 3.10 (64-bit)
C:\temp>set PYLAUNCH_DEBUG=1
C:\temp>\Windows\py.exe
Python 3.11.0b3 (main, Jun 1
On 09/06/2022 00:53, Richard David wrote:
Why am I not getting debug output on my windows 10 machine:
C:\temp>\Windows\py.exe -0
-V:3.11 *Python 3.11 (64-bit)
-V:3.10 Python 3.10 (64-bit)
C:\temp>set PYLAUNCH_DEBUG=1
C:\temp>\Windows\py.exe
Python 3.11.0b3 (main, Jun 1
On 07/06/2022 00:28, Israel Brewster wrote:
I have some large (>100GB) datasets loaded into memory in a two-dimensional (X
and Y) NumPy array backed XArray dataset. At one point I want to filter the data
using a boolean array created by performing a boolean operation on the dataset
that is, I
On 23/05/2022 22:54, Tola Oj wrote:
i just finished learning oop as a beginner and trying to practice with it
but i ran into this typeerror issue, help please.
Traceback (most recent call last):
File
"c:\Users\ojomo\OneDrive\Desktop\myexcel\oop_learn.py\myExperiment.py\mainMain.py",
line 36,
when neither the search nor the replacement terms are
> regular expressions) with simple string operations...
>
> stripped = "".join(quoted.split("'"))
Whether that's easier to understand it very much in the eye of the
beholder.
hp
--
_ | Peter
On 13/05/2022 18:37, bryangan41 wrote:
Is the following LBYL:foo = 123if foo < 200: do()If so, how to change to
EAFP?Thanks!Sent from Samsung tablet.
The distinction between look-before-you-leap and
easier-to-ask-forgiveness-than-permission is weaker than yo might expect.
When you write
ple are probably even worse at
observing the position of their various mouth parts while speaking than
at listening, so without feedback from a native speaker (preferably a
trained voice coach) they can't really tell whether they are doing it
right.
hp
--
_ | Peter J
dicts are a good fit if want to group records by
subset of their attributes (think "group by" in SQL)
* Objects in general are often though of as units, even if they have
composite values and you might want to look up something by that
value.
hp
--
_ | Peter J. Holzer
hat question with the information you gave us.
hp
--
_ | Peter J. Holzer| Story must make more sense than reality.
|_|_) ||
| | | h...@hjp.at |-- Charles Stross, "Creative writing
__/ | http://www.hjp.at/ | challenge!"
signature.asc
Desc
t going to end up iterating over it all, I would pay the
> memory price.
Me, too. Problem with a library function (as Marco proposes) is that you
don't know how it will be used.
hp
--
_ | Peter J. Holzer| Story must make more sense than reality.
|_|_) |
On 20/04/2022 13:01, Sam Ezeh wrote:
I went back to the code recently and I remembered what the problem was.
I was using multiprocessing.Pool.pmap which takes a callable (the
lambda here) so I wasn't able to use comprehensions or starmap
Is there anything for situations like these?
Hm, I
thread.
It doesn't test canonicalization yet (and indeed the prototype
implementation is a mess in this regard) and subtracting timedeltacals
from datetimes is also still missing.
hp
--
_ | Peter J. Holzer| Story must make more sense than reality.
|_|_) ||
| |
On 2022-04-17 10:15:54 +0200, Peter J. Holzer wrote:
> On 2022-04-17 06:08:54 +1000, Chris Angelico wrote:
> > On Sun, 17 Apr 2022 at 03:37, Peter J. Holzer wrote:
> > > Therefore a new class (provisionally called timedeltacal, because it is
> > > calendaric, no
On 2022-04-17 06:08:54 +1000, Chris Angelico wrote:
> On Sun, 17 Apr 2022 at 03:37, Peter J. Holzer wrote:
> > Datetime arithmetic in the real world is typically not done in seconds,
> > but in calendaric units: Hours, days, weeks, months, years, ...
> > The problem is that
On 2022-04-16 20:35:22 -, Jon Ribbens via Python-list wrote:
> On 2022-04-16, Peter J. Holzer wrote:
> > On 2022-04-16 14:22:04 -, Jon Ribbens via Python-list wrote:
> >> ... although now having looked into the new 'zoneinfo' module slightly,
> >> it rea
On 2022-04-17 02:46:38 +1000, Chris Angelico wrote:
> On Sun, 17 Apr 2022 at 02:45, Peter J. Holzer wrote:
> > For adding a datetime and timedelta I think the answer is clear.
> > But subtracting two datetimes is ambiguous.
> >
>
> But if the difference between t
On 2022-04-16 19:35:51 +0200, Peter J. Holzer wrote:
> Note that t + d - d is in general not equal to t.
>
> We can't cnange the semantics of datetime - datetime, so there must be a
> function to compute the difference between to datetimes as a
> timedeltacal. It could be a met
On 2022-04-17 02:46:38 +1000, Chris Angelico wrote:
> On Sun, 17 Apr 2022 at 02:45, Peter J. Holzer wrote:
> > On 2022-04-17 02:14:44 +1000, Chris Angelico wrote:
> > > So which one is it? Which one do you get when you add days=7 to a
> > > datetime?
> >
> >
etime (maybe t.sub(u) for t-u
like in Go) or a constructor which takes two datetime objects.
In any case I think that u + (t - u) == t should hold. [TODO: Check that
this is possible]
hp
--
_ | Peter J. Holzer| Story must make more sense than reality.
|_|_) ||
| |
On 2022-04-17 02:14:44 +1000, Chris Angelico wrote:
> On Sun, 17 Apr 2022 at 02:03, Peter J. Holzer wrote:
> > On the contrary. When a datetime is timezone aware, it must use that
> > timezone's rules. Adding one day to a datetime just before a DST switch
> > must add 2
On 2022-04-16 14:22:04 -, Jon Ribbens via Python-list wrote:
> On 2022-04-16, Jon Ribbens wrote:
> > On 2022-04-16, Peter J. Holzer wrote:
> >> Python missed the switch to DST here, the timezone is wrong.
> >
> > Because you didn't let it use any timezone infor
On 2022-04-16 13:47:32 -, Jon Ribbens via Python-list wrote:
> On 2022-04-16, Peter J. Holzer wrote:
> > On 2022-04-14 15:22:29 -, Jon Ribbens via Python-list wrote:
> >> On 2022-04-14, Paul Bryan wrote:
> >> > I think because minutes and hours can eas
here they have to be for
the tools to find them (yes, this is on Ubuntu).
hp
--
_ | Peter J. Holzer| Story must make more sense than reality.
|_|_) ||
| | | h...@hjp.at |-- Charles Stross, "Creative writing
__/ | http://www.hjp.at/ | challen
e: 5.542 ms
hjp=> select '2022-03-26T12:00'::timestamptz + '1 day'::interval;
╔╗
║?column?║
╟╢
║ 2022-03-27 12:00:00+02 ║
╚════╝
(1 row)
It correctly determines that DST is already in effect at noon of March 27th.
hp
On 2022-04-14 19:31:58 +0200, Marco Sulla wrote:
> On Wed, 13 Apr 2022 at 20:05, Peter J. Holzer wrote:
> >
> > On 2022-04-12 21:03:00 +0200, Marco Sulla wrote:
> > > On Tue, 29 Mar 2022 at 00:10, Peter J. Holzer wrote:
> > > > They are are about a year
On 2022-04-12 21:03:00 +0200, Marco Sulla wrote:
> On Tue, 29 Mar 2022 at 00:10, Peter J. Holzer wrote:
> > They are are about a year apart, so they will usually contain different
> > versions of most packages right from the start. So the Ubuntu and Debian
> > security
On Tue, 12 Apr 2022 04:56:22 -0700 (PDT), NArshad wrote:
>
>>By looping over elements in "books" and incrementing counter i,
>>which is used as an index both for "books" and for "students",
>>you will produce an error whenever the number of books exceeds
>>the number of students. Is there some
On Mon, 11 Apr 2022 00:14:49 -0700 (PDT), NArshad wrote:
[snip]
> books = list(models.Book.objects.filter(isbn=i.isbn))
> students = list(models.Student.objects.filter(user=i.student_id))
> i=0
> for l in books:
>
>
On Sat, 9 Apr 2022 04:59:05 -0700 (PDT), NArshad wrote:
> I have accidentally deleted one account in a Django project because of
> which one of the pages is no more accessible and is giving the error
> written below:
>
> IndexError at /view_issued_book/
> list index out of range
>
> and the error
On 2022-04-03 23:17:04 +0200, Marco Sulla wrote:
> On Sun, 3 Apr 2022 at 21:46, Peter J. Holzer wrote:
> > > > data.get_deep("users", 0, "address", "street", default="second star")
> >
> > Yep. Did that, too. Plus pass the fin
do you establish identity.
The second is how do you ween out identical objects. In your first mail
you only asked about the second, but that's easy.
The first is really hard. Not only may information be missing, no single
single piece of information is unique or immutable. Two people may have
the same
Change by Peter Lovett :
--
nosy: +PeterL777
___
Python tracker
<https://bugs.python.org/issue12445>
___
___
Python-bugs-list mailing list
Unsubscribe:
for i in path:
try:
coll = coll[i]
except (KeyError, IndexError, TypeError):
return default
if cast:
coll = cast(coll)
return coll
which can then be called in a single line.
> Structural matching gives you warranty you proces
On 2022-03-31 09:46:14 +0200, Cecil Westerhof via Python-list wrote:
> "Peter J. Holzer" writes:
> > Standard policy (there are exceptions) on most distros is to stay with
> > the same version of any package for the entire lifetime. So for example,
> > Ubuntu 20.04
On 2022-03-30 08:48:36 +0200, Marco Sulla wrote:
> On Tue, 29 Mar 2022 at 00:10, Peter J. Holzer wrote:
> > They are are about a year apart, so they will usually contain different
> > versions of most packages right from the start. So the Ubuntu and Debian
> > security
Peter Lovett added the comment:
Thanks Eric.
--
___
Python tracker
<https://bugs.python.org/issue31140>
___
___
Python-bugs-list mailing list
Unsubscribe:
Peter Lovett added the comment:
I'm not getting the problem on 3.9.7 on Windows.
Did get it on 3.7 (3.7.11?) on a different Windows machine last week.
Not getting the problem on 3.10.4
The wrong line number is a problem for IDLE's syntax highlighter, that marks
the first line as a Syntax
Change by Peter Lovett :
--
nosy: +PeterL777
___
Python tracker
<https://bugs.python.org/issue31140>
___
___
Python-bugs-list mailing list
Unsubscribe:
ar.
> So Ubuntu starts very close to Debian security wise, but will shift
> rapidly.
They are are about a year apart, so they will usually contain different
versions of most packages right from the start. So the Ubuntu and Debian
security teams probably can't benefit much from each other.
On 27/03/2022 11:24, Manfred Lotz wrote:
Let's say I have a Python app and have used an undefined method somewhere. Let
us further assume I have not detected it thru my tests.
Is there a way to detect it before deploying the app? pylint doesn't notice it.
Minimal example:
#!/usr/bin/env
On 2022-03-07 06:00:57 -0800, Grant Edwards wrote:
> On 2022-03-07, Peter J. Holzer wrote:
> > On 2022-03-06 18:34:39 -0800, Grant Edwards wrote:
> >> On 2022-03-06, Avi Gross via Python-list wrote:
> >> > Python is named after a snake right?
> >>
&g
On Mon, 7 Mar 2022 16:22:10 +, Robin Becker wrote:
[snip]
>
> gcc -bundle -undefined dynamic_lookup -g -arch arm64
[snip]
> -L/usr/local/lib
> -L/usr/lib
> -L/Library/Frameworks/Python.framework/Versions/3.9/lib
> -lfreetype
[snip]
>
> ld: warning: ignoring file
On 2022-03-06 18:34:39 -0800, Grant Edwards wrote:
> On 2022-03-06, Avi Gross via Python-list wrote:
> > Python is named after a snake right?
>
> No. It's named after a comedy troupe.
He actually wrote that two sentences later.
hp
--
_ | Peter J. Holzer| Story
On 2022-03-06 18:28:59 +0100, Peter J. Holzer wrote:
> On 2022-03-05 16:25:38 +, Barry Scott wrote:
> > Using the syslog() function means that any platform/distro details are
> > hidden from the user of syslog() and as is the case of macOS it
> > "just works".
&g
> much of my grad school work in PASCAL [...]
>
> It's "Pascal". It's not an acronym. It's a guy's name:
>
> https://en.wikipedia.org/wiki/Blaise_Pascal
And similarly, it's "Perl", not "PERL" (also misspelled in this thread).
h
On 2022-03-05 16:25:38 +, Barry Scott wrote:
> On 4 Mar 2022, at 21:23, Peter J. Holzer wrote:
> > If you are saying that SysLogHandler should use a system specific
> > default (e.g. "/dev/log" on Linux) instead of UDP port 514 everywhere, I
> > agree 99 % (the
t may not be true for build dependencies, though.)
hp
--
_ | Peter J. Holzer| Story must make more sense than reality.
|_|_) ||
| | | h...@hjp.at |-- Charles Stross, "Creative writing
__/ | http://www.hjp.at/ | challenge!"
signature.asc
as alternative rerpresentations for characters not in the common
subset of ISO-646 and EBCDIC. However, the trigraphs are extremely ugly
(e.g ??< ??> instead of { }). I have seen them used (on an IBM/390
system with an EBCDIC variant without curly braces) and it's really no
fun to read that.
On 2022-03-05 00:25:44 +0100, Peter J. Holzer wrote:
> On 2022-03-04 11:34:07 +1100, Chris Angelico wrote:
> > What I'm hearing is that there are, broadly speaking, two types of
> > programmers [1]:
> >
> > 1) Those who think about "for-else" as a search
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
> as you point out, when using a German keyboard, I would already have
> a way to enter symbols like ä, ö, ü and ß and no reason not to include
> them
s week - but I
can't find it any more which probably means that it was either in a
throwaway script or I have since rewritten the code.
hp
--
_ | Peter J. Holzer| Story must make more sense than reality.
|_|_) ||
| | | h...@hjp.at |-- Charles Stross, &quo
ave to write
{% if athlete_list %}
{% for athlete in athlete_list %}
{{ athlete.name }}
{% empty %}
{% else %}
Sorry, no athletes in this list.
{%endif %}
anyway.
hp
--
_ | Peter J. Holzer| Sto
with a space (actually called "WITH SPA.TXT", because upper case
only and 8+3).
It was a bad idea to do this, though, because there was no way to
manipulate such a file from command.com (You'd have to write another C
program).
hp
--
_ | Peter
u have to
restrict yourself to a character set that most people can comfortably
type on their keyboards with the key mapping provided by their OS. Which
for historical reasons means US-ASCII.
hp
--
_ | Peter J. Holzer| Story must make more sense than reality.
|_|_) |
On 2022-02-28 22:05:05 +, Barry Scott wrote:
> On 28 Feb 2022, at 21:41, Peter J. Holzer wrote:
> > On 2022-02-27 22:16:54 +, Barry wrote:
> >> I have always assumed that if I want a logger syslog handler that I would
> >> have
> >> to implement it
but without s specific context (like business
days) I would agree. A day *is* a time period with a beginning and an
end.
hp
--
_ | Peter J. Holzer| Story must make more sense than reality.
|_|_) ||
| | | h...@hjp.at |-- Charles Stross, "Cr
Peter Roelants added the comment:
If I understand correctly this should be fixed? In which 3.10.* version should
this be fixed?
The reason why I'm asking is that I ran into this issue when using Dask
(2022.02.0) with multithreading on Python 3.10.2:
Exception in thread Profile:
Traceback
On 02/03/2022 01:32, Rob Cliffe via Python-list wrote:
itertools.product returns an iterator (or iterable, I'm not sure of the
correct technical term).
There's a simple test:
iter(x) is x --> True # iterator
iter(x) is x --> False # iterable
So:
>>> from itertools import product
>>> p =
be configured to forward messages to
a remote server, however).
hp
--
_ | Peter J. Holzer| Story must make more sense than reality.
|_|_) ||
| | | h...@hjp.at |-- Charles Stross, "Creative writing
__/ | http://www.hjp.at/ | challenge!"
On 27/02/2022 17:28, Chris Angelico wrote:
On Mon, 28 Feb 2022 at 03:24, MRAB wrote:
On 2022-02-27 08:51, Barry Scott wrote:
On 22 Feb 2022, at 09:30, Chris Angelico wrote:
On Tue, 22 Feb 2022 at 20:24, Frank Millman mailto:fr...@chagford.com>> wrote:
Hi all
I think this should be a
| power |
|| primary | primary| primary|
primary| atom| atom | atom |
atom | literal | literal| literal|
identifier | integer | integer| integer
of those features that seemed like a good idea to the developers but
aren't really used by anyone in practice.
hp
--
_ | Peter J. Holzer| Story must make more sense than reality.
|_|_) ||
| | | h...@hjp.at |-- Charles Stross, "Cr
offline mode if none
(except loopback) are up. But fundamentally it's about the state of the
browser ("... must return false if the user agent will not contact the
network ...") not about whether your computer has "internet access" in
any meaningful sense.
hp
--
On 22/02/2022 10:44, Frank Millman wrote:
On 2022-02-22 11:30 AM, Chris Angelico wrote:
On Tue, 22 Feb 2022 at 20:24, Frank Millman wrote:
Hi all
I think this should be a simple one-liner, but I cannot figure it out.
I have a dictionary with a number of keys, where each value is a single
whether the
> env-variant is good or bad. ;-) It's not that *I* use it, but
> several progs in /usr/bin/.
Progs in /usr/bin should IMHO never use /usr/bin/env. They should always
use #!/usr/bin/python3. You might want to report that as a bug to your
distribution.
hp
--
_ | Peter
e to an address (try «nslookup» or
«host» or «dig» depending on your OS)?
* Can you access the whole URL with a different tool like «wget» or
«curl»?
hp
--
_ | Peter J. Holzer| Story must make more sense than reality.
|_|_) ||
| | | h...@hjp.at |
On 2022-02-11 18:20:19 -0500, Dennis Lee Bieber wrote:
> On Fri, 11 Feb 2022 20:37:57 +0100, "Peter J. Holzer"
> declaimed the following:
>
> >Interestingly, Excel did have the ability for multiple users editing the
> >same file at some time (maybe earl
bility.
hp
--
_ | Peter J. Holzer| Story must make more sense than reality.
|_|_) ||
| | | h...@hjp.at |-- Charles Stross, "Creative writing
__/ | http://www.hjp.at/ | challenge!"
signature.asc
Description: PGP signature
--
ht
On 10/02/2022 09:20, Igor Basko wrote:
Hi everyone,
This is my first question here. Hope to get some clarification.
Basically this question is about multiple inheritance and the usage of
super().__init__ in parent
classes.
So I have two classes that inherit from the same base class.
For example
in your app, see what data they are requesting and
altering and craft appropriate log messages for each.
hp
--
_ | Peter J. Holzer| Story must make more sense than reality.
|_|_) ||
| | | h...@hjp.at |-- Charles Stross, "Creative writing
et({1, 2}))
with
1 0 LOAD_CONST 0 (1)
2 LOAD_CONST 1 (2)
4 BUILD_SET2
and you see the difference between using a frozenset as a constant and
building a set at runtime.
hp
--
_ | Pet
On 2022-01-11 12:38:44 -0800, Paul Bryan wrote:
> Subscribed. ️
Same.
hp
--
_ | Peter J. Holzer| Story must make more sense than reality.
|_|_) ||
| | | h...@hjp.at |-- Charles Stross, "Creative writing
__/ | http://ww
ted .xlsx since at least 2014 (when I
started using it). For new projects I would recommend openpyxl though,
which is much more feature-complete.
hp
--
_ | Peter J. Holzer| Story must make more sense than reality.
|_|_) ||
| | | h...@hjp.at |-- Charl
word-break: break-all» seems like a really weird choice for
English language text. If you really want to break words across
lines, use «hyphens: auto».
hp
--
_ | Peter J. Holzer| Story must make more sense than reality.
|_|_) ||
| | | h...@hjp.at |
above are common when the virtual
environment was built with a different (older) version of the Python
interpreter than the one trying to use it. Nuking and rebuilding the
virtual environment is usually the quickest way to fix it.
hp
--
_ | Peter J. Holzer| Story must make more sense than r
Quentin Peter added the comment:
Maybe a note could be added to
https://docs.python.org/3/library/functions.html#exec
Something along the lines of:
Note: If exec gets two separate objects as `globals` and `locals`, the code
will not be executed as if it were embedded in a function
Quentin Peter added the comment:
Thank you for your explaination. Just to be sure, it is expected that:
exec("a = 1\ndef f(): return a\nprint(f())", {})
Runs successfully but
exec("a = 1\ndef f(): return a\nprint(f())&quo
Quentin Peter added the comment:
The reason I am asking is that I am working on a debugger. The debugger stops
on a frame which is inside a function. Let's say the locals is:
locals() == {"a": 1}
I now want to define a closure with exec. I might want to do something like:
e
201 - 300 of 9800 matches
Mail list logo