On 06/07/2024 12:57, Oscar Benjamin via Python-list wrote:
On Sat, 6 Jul 2024 at 11:55, Rob Cliffe via Python-list
wrote:
Consider this scenario (which I ran into in real life):
I want to open a text file and do a lot of processing on the lines
of that file.
If the file does
On 07/07/2024 02:08, Cameron Simpson wrote:
On 06Jul2024 11:49, Rob Cliffe wrote:
try:
f = open(FileName) as f:
FileLines = f.readlines()
except FileNotFoundError:
print(f"File {FileName} not found")
sys.exit()
# I forgot to put "f.close()" here -:)
modify the last attempt to open the file twice, which would
work, but seems like a kludge (subject to race condition, inefficient).
Is there a better / more Pythonic solution?
Best wishes
Rob Cliffe
--
https://mail.python.org/mailman/listinfo/python-list
o far
Traceback (most recent call last):
File "C:\TEST*.PY", line 8, in
SetClipboardData(CF_UNICODETEXT, "0")
pywintypes.error: (0, 'SetClipboardData', 'No error message is available')
Can anyone shed light on this?
Best wishes
Rob Cliffe
--
https://mail.python.org/mailman/listinfo/python-list
output:
['aaa', 'bb', '', 'aa']
[('a', 3), ('b', 2), ('c', 4), ('a', 2)]
Rob Cliffe
On 09/06/2024 22:20, HenHanna via Python-list wrote:
Chunk, ChunkC -- nice simple way(s) to write these in Python?
(Chunk '(a a b a a a b b))
==> ((a a) (b) (a a a) (b b))
(Chunk '(a a a a
uot; prompt appears on the SECOND
line.
(This blank line is because the IDLE prints the blank value returned by
"return ''" and adds a newline to it, as it does when printing the value
of any expression.)
Best wishes
Rob Cliffe
--
https://mail.python.org/mailman/listinfo/python-list
On 05/06/2024 04:09, Cameron Simpson wrote:
On 04Jun2024 22:43, Rob Cliffe wrote:
import os
def cls(): x=os.system("cls")
Now whenever you type
cls()
it will clear the screen and show the prompt at the top of the screen.
(The reason for the "x=" is: os.system returns a
. So without the "x=" you get an extra line at the top of the
screen containing "0".)
I am sure that some jiggery-pokery could be used so you don't have to
type the "()". But that's more advanced ...
Best wishes
Rob Cliffe
On 04/06/2024 14:34, Cave Man
rograms that beep.
Can anyone shed light on this, and perhaps give a simpler fix?
Best wishes
Rob Cliffe
--
https://mail.python.org/mailman/listinfo/python-list
_UNICODETEXT, "0")
pywintypes.error: (0, 'SetClipboardData', 'No error message is available')
I can get round the problem by using SetClipboardText(). But can anyone
shed light on this?
Best wishes
Rob Cliffe
--
https://mail.python.org/mailman/listinfo/python-list
It's not a bug, it's an empty unpacking.
Just as you can write
[A,B] = [1,2] # Sets A to 1, B to 2
Best wishes
Rob Cliffe
On 23/09/2023 04:41, Greg Ewing via Python-list wrote:
On 23/09/23 4:51 am, Stefan Ram wrote:
[]=[]
(Executes with no error.)
#
[]=[]
( 1 )
#\_/#
(Executes
don't know), and error-prone if I want
to add some more Things.
Rob Cliffe
--
https://mail.python.org/mailman/listinfo/python-list
ocus change, but I can immediately cancel it with
X.after(0, SomeOtherWidget.focus_set)
where X is any convenient object with the "after" method (just about any
widget, or the root).
Best wishes
Rob Cliffe
--
https://mail.python.org/mailman/listinfo/python-list
ssible to have a different error message, something like
ValueError: int expected in format string but decimal.Decimal found
Or am I missing something?
Best wishes
Rob Cliffe
--
https://mail.python.org/mailman/listinfo/python-list
60)
(Decimal('-0'), Decimal('-1'))
Best wishes
Rob Cliffe
--
https://mail.python.org/mailman/listinfo/python-list
=...)
On my platform (Windows10) the shadowing of tk.Button objects is
more conspicuous (without using styles or whatever).
Best wishes
Rob Cliffe
--
https://mail.python.org/mailman/listinfo/python-list
rant,
perhaps even laughable. But IMO it is often worth listening to input
from newbies to consider how things might be improved.
Comments, anyone?
Better yet (holds breath ...) can anyone point me towards some decent
tkinter documentation?
Best wishes
Rob Cliffe
--
https://mail.python.org/mailman/listinfo/python-list
On 23/05/2023 22:03, Peter J. Holzer wrote:
On 2023-05-21 20:30:45 +0100, Rob Cliffe via Python-list wrote:
On 20/05/2023 18:54, Alex Jando wrote:
So what I'm suggesting is something like this:
hash = hashlib.sha256(b'word')
hash
might return Unicode, depending
on which server it was talking to.)
Peter's actual code feels more Pythonic to me. (It's even 2 lines
shorter! )
Rob Cliffe
--
https://mail.python.org/mailman/listinfo/python-list
be perfectly appropriate to write
"num = num.value" as you did.
But IMO it's not something that should be encouraged in general.
Best wishes
Rob Cliffe
--
https://mail.python.org/mailman/listinfo/python-list
"license" for more information.
>>> import tkinter
>>> tkinter.messagebox
Traceback (most recent call last):
File "", line 1, in
AttributeError: module 'tkinter' has no attribute 'messagebox'
>>>
Why is this?
TIA
Rob Cliffe
--
https://mail.python.org/mailman/listinfo/python-list
func() # Called with no arguments
Best wishes
Rob Cliffe
On 20/04/2023 23:44, Lorenzo Catoni wrote:
Dear Python Mailing List members,
I am writing to seek your assistance in understanding an unexpected
behavior that I encountered while using the __enter__ method. I have
provided a code snippet belo
!= '']
nextWords = []
for w in CopyOfWords:
if w[0] != ch:
nextWords.append(w)
elif len(w) > 1:
nextWords.append(w[1:])
assert Words == nextWords
Why?
Rob Cliffe
From: Python-list on behalf of
Rob Cli
it.
+1
Whenever I see code with type hints, I have to edit them out, either
mentally, or physically, to understand what the code is actually doing.
It's adding new syntax which I'm not used to and don't want to be forced
to learn.
Rob Cliffe
--
https://mail.python.org/mailman/listinfo/python
his condition.
Alternatively you could ensure that there is a final separator:
s = 'alpha.beta.gamma.'
but you would still need to test when the string was exhausted.
Best wishes
Rob Cliffe
--
https://mail.python.org/mailman/listinfo/python-list
f software announcements would include
a single paragraph (or maybe just a single sentence) summarizing what
the software is and does.
hp
+1
Rob Cliffe
--
https://mail.python.org/mailman/listinfo/python-list
ial + BestResult + Final
print(Pack(['APPLE', 'PIE', 'APRICOT', 'BANANA', 'CANDY']))
Rob Cliffe
--
https://mail.python.org/mailman/listinfo/python-list
COT', 'BANANA', 'CANDY']))
The output:
BAPPRICNANADYOTLE
which has the same length as the answer I came up with trying to solve
it with my unaided brain, which may or may not be reassuring ,
and also contains a much-needed BRANDY.
I expect there are simpler and more efficient solutions.
Best wish
On 01/03/2023 18:46, Thomas Passin wrote:
If this is what actually happened, this particular behavior occurs
because Python on Windows in a console terminates with a
instead of the usual .
I think you mean .
--
https://mail.python.org/mailman/listinfo/python-list
On 27/02/2023 21:04, Ethan Furman wrote:
On 2/27/23 12:20, rbowman wrote:
> "By using Black, you agree to cede control over minutiae of hand-
> formatting. In return, Black gives you speed, determinism, and freedom
> from pycodestyle nagging about formatting. You will save time and
mental
>
t line with the others (in a fixed
font of course).
Best wishes
Rob Cliffe
--
https://mail.python.org/mailman/listinfo/python-list
aged (notwithstanding that IMO it is
occasionally appropriate).
Rob Cliffe
--
https://mail.python.org/mailman/listinfo/python-list
cPay(rate=1.5)
if dow==6:
day="Sun"
calcPay(rate=2)
Not so easy to spot the mistake now, is it?
Not to mention the saving of vertical space.
Best wishes
Rob Cliffe
PS If you really care, I can send you a more complicated example of real
code from one of my programs which is HUGELY more readable when laid out
in this way.
--
https://mail.python.org/mailman/listinfo/python-list
On 22/02/2023 20:05, Hen Hanna wrote:
Python makes programming (debugging) so easy
I agree with that!
Rob Cliffe
--
https://mail.python.org/mailman/listinfo/python-list
On 18/02/2023 17:19, Albert-Jan Roskam wrote:
On Feb 18, 2023 17:28, Rob Cliffe via Python-list
wrote:
On 18/02/2023 15:29, Thomas Passin wrote:
> On 2/18/2023 5:38 AM, Albert-Jan Roskam wrote:
>> I sometimes use this trick, which I learnt from a book by
like, perhaps,
import os; print(os.path.exists(filename))
This way I can get rid of the debugging statement by deleting that
single line. This is non only quicker but I'm less likely to delete
too much by mistake.
I do exactly the same.
Rob Cliffe
--
https://mail.python.org/mailman/listinfo
On 18/02/2023 15:29, Thomas Passin wrote:
On 2/18/2023 5:38 AM, Albert-Jan Roskam wrote:
I sometimes use this trick, which I learnt from a book by Martelli.
Instead of try/except, membership testing with "in"
(__contains__) might
be faster. Probably "depends". Matter of
On 11/02/2023 00:39, Dino wrote:
First off, a big shout out to Peter J. Holzer, who mentioned roaring
bitmaps a few days ago and led me to quite a discovery.
I was intrigued to hear about roaring bitmaps and discover they really
were a thing (not a typo as I suspected at first).
What next, I
On 07/02/2023 08:15, Chris Angelico wrote:
On Tue, 7 Feb 2023 at 18:49, Rob Cliffe via Python-list
wrote:
On 02/02/2023 09:31, mutt...@dastardlyhq.com wrote:
On Wed, 1 Feb 2023 18:28:04 +0100
"Peter J. Holzer" wrote:
--b2nljkb3mdefsdhx
Content-Type: text/plain; charset=us-asc
variables
and their values? If it were possible, it could be useful, and there
would be no impact on Python run-time speed if it were only constructed
on demand.
Best wishes
Rob
--
https://mail.python.org/mailman/listinfo/python-list
both ways.
In any case, supporting two different syntaxes simultaneously would be
messy and difficult to maintain.
Better a clean break, with Python 2 support continuing for a long time
(as it was).
Best wishes
Rob Cliffe
--
https://mail.python.org/mailman/listinfo/python-list
On 27/01/2023 23:41, Chris Angelico wrote:
On Sat, 28 Jan 2023 at 10:08, Rob Cliffe via Python-list
wrote:
Whoa! Whoa! Whoa!
I appreciate the points you are making, Chris, but I am a bit taken
aback by such forceful language.
The exact same points have already been made, but not listened
ite() does return the number of characters output (you
could use this instead of print() if you need this;
remember to add a '\n' character at the end of a line). I guess the option
of making print() do the same either was not considered, or was
rejected, when print was made a function.
Best
Whoa! Whoa! Whoa!
I appreciate the points you are making, Chris, but I am a bit taken
aback by such forceful language.
On 27/01/2023 19:18, Chris Angelico wrote:
On Sat, 28 Jan 2023 at 05:31, Rob Cliffe via Python-list
wrote:
On 23/01/2023 18:02, Chris Angelico wrote:
Maybe, rather than
ively
rare requirement".
Perhaps someone will be inspired to write a function to do it.
Best wishes
Rob Cliffe
--
https://mail.python.org/mailman/listinfo/python-list
isinstance(b,int)
True
>>>
That immediately tells you that either
bool is a subclass of int
int is a subclass of bool
bool and int are both subclasses of some other class
In fact the first one is true.
This is not a logical necessity, but the way Python happens to be designe
tionaries as needed for eval to
use. Something like this:
def effify(non_f_str, glob=None, loc=None):
return eval(f'f"""{non_f_str}"""',
glob if glob is not None else globals(),
loc if loc is not None else locals())
Best wishes
Rob Cliffe
--
https://mail.python.org/mailman/listinfo/python-list
ncisely as:
listOfDescriptors = [
{ (L := list(D.items())[0])[1] } | {'value' : L[0] }
for D in origListOfDescriptors] # untested
Best wishes
Rob Cliffe
I actually did it with:
listOfDescriptors = list()
for cd in origListOfDescriptors:
cn = list(cd.keys())[0] # There
garbage-collected later).
Best wishes
Rob Cliffe
--
https://mail.python.org/mailman/listinfo/python-list
done in my own code, albeit with a feeling of guilt that I was breaking
a Python taboo. Now I will do it with a clear conscience.
Best wishes
Rob Cliffe
--
https://mail.python.org/mailman/listinfo/python-list
I too have occasionally used for ... else. It does have its uses. But
oh, how I wish it had been called something else more meaningful,
whether 'nobreak' or whatever. It used to really confuse me. Now I've
learned to mentally replace "else" by "if nobreak", it confuses
That worked. Many thanks Eryk.
Rob
On 30/06/2022 23:45, Eryk Sun wrote:
On 6/30/22, Rob Cliffe via Python-list wrote:
AKAIK it is not possible to give ctypes a bytearray object and persuade
it to give you a pointer to the actual array data, suitable for passing
to a DLL.
You're overlooking
roach, or am I still missing something?
AKAIK it is not possible to give ctypes a bytearray object and persuade
it to give you a pointer to the actual array data, suitable for passing
to a DLL. Is this (a) false (b) for historical reasons (c) for some
other good reason?
TIA
Rob Cliffe
--
htt
On 26/06/2022 23:22, Jon Ribbens via Python-list wrote:
On 2022-06-26, Rob Cliffe wrote:
This 2-line program
def f(): pass
def g(): pass
runs silently (no Exception). But:
23:07:02 c:\>python
Python 3.8.3 (tags/v3.8.3:6f8c832, May 13 2020, 22:20:19) [MSC v.1925 32
bit (Intel)] on wi
ot; for more information.
>>> def f(): pass
... def g(): pass
File "", line 2
def g(): pass
^
SyntaxError: invalid syntax
>>>
Is there a good reason for this?
Thanks
Rob Cliffe
--
https://mail.python.org/mailman/listinfo/python-list
Thanks, Paul. Question answered!
Rob Cliffe
On 16/05/2022 04:36, Paul Bryan wrote:
This may explain it:
https://stackoverflow.com/questions/27522626/hash-function-in-python-3-3-returns-different-results-between-sessions
On Mon, 2022-05-16 at 04:20 +0100, Rob Cliffe via Python-list wrote
On 16/05/2022 04:13, Dan Stromberg wrote:
On Sun, May 15, 2022 at 8:01 PM Rob Cliffe via Python-list
wrote:
I was shocked to discover that when repeatedly running the following
program (condensed from a "real" program) under Python 3.8.3
for p in { ('x','y'
xplain why running identical code should result in
traversing a set in a different order?
Thanks
Rob Cliffe
--
https://mail.python.org/mailman/listinfo/python-list
that.
Still, if you're feeling noble, you could start the work of making your
code Python 3 compatible.
Best wishes
Rob Cliffe
--
https://mail.python.org/mailman/listinfo/python-list
Well, de gustibus non est disputandum. For me, the switch from the
imperative mode to the descriptive mode produces a mild cognitive
dissonance.
Best wishes
Rob Cliffe
On 25/04/2022 23:34, Cameron Simpson wrote:
On 23Apr2022 03:26, Avi Gross wrote:
We know some people using "profess
who is
it addresed to? Is a function considered to be a sentient entity that
can respond to a command? Is it an invocation to the lines of code
following the docstring: "Do this!" Might not the programmer mistakenly
think (if only for a moment) that the imperative is addressed to him
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
h leads me right back to wondering why the sentinel approach is so bad!
It's not that bad, but it's more convenient and readable if it can be
avoided.
Best wishes
Rob Cliffe
--
https://mail.python.org/mailman/listinfo/python-list
; to mean '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
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.
1, 10, m
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 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 have had
em and move to where you want them and
replace them.
SciTE has a "transpose lines" feature. I use it frequently. But editor
features are quite different from language features.
ChrisA
[1] Something tells me I've heard this before
Of course you have. There are three types of programmer: those that can
count, and those that can't.
Rob Cliffe
--
https://mail.python.org/mailman/listinfo/python-list
:
...
... break
else: # if no item in search_list matched the criteria
You get the idea.
If I really want to remember what this construct means, I remind myself
that `else` here really means `no break`. Would have been better if it
had been spelt `nobreak` or similar in the first place.
Rob
`
if the loop was executed zero times
but these have not been accepted.
Best wishes
Rob Cliffe
On 03/03/2022 13:24, computermaster360 wrote:
I want to make a little survey here.
Do you find the for-else construct useful? Have you used it in
practice? Do you even know how it works
p - but goodwill can be used up if it is
abused.
Respectfully,
Rob Cliffe
--
https://mail.python.org/mailman/listinfo/python-list
for ops, reg in itertools.product(opsys, region):
etc.
If you need it more than once, you can convert it to a list (or tuple),
as above.
Best wishes
Rob Cliffe
On 02/03/2022 00:12, Larry Martell wrote:
If I have 2 lists, e.g.:
os = ["Linux","Windows"]
region
is read-only, though. If the
inner function writes to one of the readable external variables, that
variable becomes local to the inner function.
You can make it continue to refer to the variables of the imbedding
function, i.e. b(), by declaring them non-local, e.g.
nonlocal c
Rob Cliffe
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
If for ... else was spelt more intelligibly, e.g. for ... nobreak, there
would be no temptation to use anything like `elif'. `nobreakif' wouldn't
be a keyword.
Rob Cliffe
On 30/11/2021 06:24, Chris Angelico wrote:
for ns in namespaces:
if name in ns:
print("
Change by Rob :
--
keywords: +patch
pull_requests: +28085
stage: -> patch review
pull_request: https://github.com/python/cpython/pull/29857
___
Python tracker
<https://bugs.python.org/issu
argument means
"don't slice here"
[do stuff]
Best wishes
Rob Cliffe
On 26/11/2021 09:17, Frank Millman wrote:
Hi all
In my program I have a for-loop like this -
>>> for item in x[:-y]:
... [do stuff]
'y' may or may not be 0. If it is 0 I want to process
Rob added the comment:
Ok will do. Thanks for confirming.
--
___
Python tracker
<https://bugs.python.org/issue45896>
___
___
Python-bugs-list mailing list
Unsub
New submission from Rob :
Hi,
In the docs for the asyncio event loop, it has a note on page:
https://docs.python.org/3/library/asyncio-eventloop.html#running-subprocesses
"Note The default asyncio event loop on Windows does not support subprocesses.
See Subprocess Support on Wi
New submission from Rob Blackbourn :
The issue 34975 "start_tls() difficult when using asyncio.start_server()" was
closed because streams was being re-written, but it's still a useful
enhancement, and a fairly simple change.
Could this be revisited?
I've done a proof of concept he
is a repeating decimal but 14 and 10 are not coprime.
I believe it is correct to say that infinitely recurring expansions
occur when the denominator is divisible by a prime that does not divide
the base.
Rob Cliffe
--
https://mail.python.org/mailman/listinfo/python-list
non-mathematician. I think we have had enough denigration of experts.
Best
Rob Cliffe
--
https://mail.python.org/mailman/listinfo/python-list
Rob Nelson added the comment:
The code referenced in the previous comment only hits for tarfiles built from
Streams.
The same (incorrect) code exists in the gzip.py library as well, and hits the
more common usecase of building a tar.gz from a set of files on disk.
def _write_gzip_header
) events?
(I'm not familiar with tkinter, but in wxpython you can.)
And if so, does trapping KeyUp solve the problem?
Best wishes
Rob Cliffe
--
https://mail.python.org/mailman/listinfo/python-list
, subject to race conditions, file
permission errors, wrong state after a crash, and probably other problems.
It could be cleaned up a bit with try ... except, but is still not to be
recommended.
Can you just create a copy of your file with a .py extension?
Best wishes
Rob Cliffe
On 22/10/2021 12
Ah, Z80s (deep sigh). Those were the days! You could disassemble the
entire CP/M operating system (including the BIOS), and still have many
Kb to play with! Real programmers don't need gigabytes!
On 29/09/2021 03:03, 2qdxy4rzwzuui...@potatochowder.com wrote:
On 2021-09-29 at 09:21:34
Change by Rob Moore :
--
nosy: +rob.moore
___
Python tracker
<https://bugs.python.org/issue22239>
___
___
Python-bugs-list mailing list
Unsubscribe:
it prints
a line containing a blank tuple: '()'.
A 2/3-compatible way of outputting a blank line is
print('')
Best wishes
Rob Cliffe
On 04/09/2021 20:50, Peter J. Holzer wrote:
On 2021-09-04 14:29:47 -0500, Igor Korot wrote:
Will this syntax work in python 2?
Yes. It's just a redundant
ever used type annotations, I've never planned to used them. And
now that all is revealed, I'm afraid that my reaction is: I'm even more
inclined never to use them, because these examples are (to me) so confusing.
Rob Cliffe
--
https://mail.python.org/mailman/listinfo/python-list
somewhere in Python.
Can anybody shed light on this?
Best wishes
Rob Cliffe
PS I have a very vague idea it's to do with mixing 32-bit and 64-bit
software.
On 20/06/2021 05:21, Liya Ann Sunny wrote:
After installing Anaconda, I tried to open the anaconda navigator but it did
not work.
When i check i
On 19/06/2021 07:50, Chris Angelico wrote:
On Sat, Jun 19, 2021 at 4:16 PM Rob Cliffe via Python-list
wrote:
On 18/06/2021 11:04, Chris Angelico wrote:
sys.version
'3.10.0b2+ (heads/3.10:33a7a24288, Jun 9 2021, 20:47:39) [GCC 8.3.0]'
def chk(x):
... if not(0 < x < 10):
IF_FALSE 21 (to 14)
24 LOAD_CONST 0 (None)
26 RETURN_VALUE
>>>
(there may be mistakes in this) but this is probably too much to expect
of the compiler.
Rob Cliffe
--
https://mail.python.org/mailman/listinfo/python-list
reate (or cause to get created) a single instance of it which is used
when required. Indeed disassembling the code shows that LOAD_CONST is
used to get the tuple. But it obviously can't do that when the tuple
contains a variable.
Rob Cliffe
On 14/06/2021 20:35, Chris Angelico wrote:
On Tue,
easy to throw ideas around!
Regards
Rob Cliffe
--
https://mail.python.org/mailman/listinfo/python-list
ence with Python you
will remember the commonest built-in types (int, float, list, dict, str
etc.).
Regards
Rob Cliffe
--
https://mail.python.org/mailman/listinfo/python-list
)
# It might be hard to spot the
comma at first glance so the parentheses might help to recognise a tuple.
Best wishes
Rob Cliffe
--
https://mail.python.org/mailman/listinfo/python-list
p
trigger arbitrary code?
Then I saw your post in the "Yield after the return in Python function"
thread. (Took me a while to understand it.) So I ask:
Can you make a variable lookup trigger arbitrary code, other than in
code passed to eval/exec/compile?
TIA
Rob Cliffe
--
https://mai
t; from my "safe" list because I now realise that
"set" could be reassigned.
Correction: set literals like {7,8} should still be OK as far as I can see.
Rob Cliffe
--
https://mail.python.org/mailman/listinfo/python-list
On 05/04/2021 17:52, Chris Angelico wrote:
On Tue, Apr 6, 2021 at 2:32 AM Rob Cliffe via Python-list
wrote:
It doesn't appear to, at least not always. In Python 3.8.3:
from dis import dis
def f(): x = 1 ; y = 2
def g(): (x,y) = (1,2)
dis(f)
dis(g)
Output:
2 0 LOAD_CONST
On 05/04/2021 00:47, dn via Python-list wrote:
On 04/04/2021 01.00, Rob Cliffe via Python-list wrote:
On 03/04/2021 04:09, 2qdxy4rzwzuui...@potatochowder.com wrote:
On 2021-04-03 at 02:41:59 +0100,
Rob Cliffe via Python-list wrote:
x1 = 42; y1 = 3; z1 = 10
x2 = 41; y2 = 12
1 - 100 of 1071 matches
Mail list logo