tall a package, e.g. germalemma. Python
3.8.10 can use it, but Python 3.9.6 can't find it.
If 'py' starts 3.9, then
py -m pip install xyz
will install xyz for 3.9. (In not, py -3.9 -m pip ... will)
The command 'python' takes one to the MS store unless one has alr
27;ll do.
Try something like
fors = 0
for file in files:
for line in file:
if re.match(r"/s*for .* in ", line):
fors += 1
This excludes comprehensions, which have replaced some for loops.
--
Terry Jan Reedy
--
https://mail.python.org/mailman/listinfo/python-list
== y:
return i, (x,y)
# return "The universe ends as the essentially impossible happened"
--
Terry Jan Reedy
--
https://mail.python.org/mailman/listinfo/python-list
searchable, I list them here.
Steven D'Aprano:
d1 == d2 and all(k1 == k2 for k1, k2 in zip(d1, d2))
Sethiy Storchaka:
list(d1.items()) == list(d2.items())
# When using unittest, produces nicer report on failure.
Raymond Hettinger:
assert OrderedDict(d) == OrderedDict(e)
--
Terry Jan Reedy
--
In interactive mode, print is not usually needed.
>>> sysconfig.get_python_inc()
'C:\\Programs\\Python310\\include'
--
Terry Jan Reedy
--
https://mail.python.org/mailman/listinfo/python-list
al keyword, is even
harder. Three of us could not get all the cases we tested correct and I
suspect doing so without running the PEG parser may be impossible.
Since highlighting is redone with each keystroke, I suspect doing the
latter would add a noticeable and unacceptable lag between keystrokes
and display.
--
Terry Jan Reedy
--
https://mail.python.org/mailman/listinfo/python-list
while. Or maybe it needs to be read more.
--
Terry Jan Reedy
--
https://mail.python.org/mailman/listinfo/python-list
different similarly small benchmarks.
--
Terry Jan Reedy
--
https://mail.python.org/mailman/listinfo/python-list
with peculiar locals behavior, and with 'return', 'yield',
and 'nonlocal' valid. It would make no sense to treat the code passed
to exec as a function suite.
--
Terry Jan Reedy
--
https://mail.python.org/mailman/listinfo/python-list
erted from 0/1 to False/True. I don't know if this
particular holdover is intentional -- fear of breaking something -- or
oversight/inertia.
I searched the tracker for 'strtobool' in component 'distutiles', status
"don't care", and there were no hits.
ask above, I ended up with more or
less callback free code using async def and async for. Once I got over
the hump, I rather like it.
--
Terry Jan Reedy
--
https://mail.python.org/mailman/listinfo/python-list
On 8/11/2016 2:34 AM, Christian Gollwitzer wrote:
Am 11.08.16 um 06:38 schrieb Terry Reedy:
You might be able to glean something from the succession of files I
uploaded to
https://bugs.python.org/issue27546
Integrate tkinter and asyncio (and async)
I started with just mixing tk and asyncio
quot;cond then trueval else falseval"
and "if cond then trueval else falseval" and other variations.
* In a construction like "The cock crows? If so, I must go, else I
would tarry with thee longer." the 'if' follows the question, yet
cannot standalone but must be followed by something referring back to
the question.
--
Terry Jan Reedy
--
https://mail.python.org/mailman/listinfo/python-list
text.yview(line)
drop.add_command(label=section_name, command=goto)
To me, this is much better and I intend to commit it. Thank you for
prodding me to think through how bad the lambda form can be and to
rewrite the loop so I don't cringe reading it.
--
Terry Jan Reedy
--
https://mail.python.org/mailman/listinfo/python-list
': 'EPSG4326'},
'type': 'name'},
'type': 'Point'},
'ospoint': {'coordinates': [631380.0, 141464.0],
'crs': {'properties': {'name': 'EPSG27700'},
'type': 'name'},
'type': 'Point'},
'stationname': 'Dover Priory Rail Station',
'tiploccode': 'DOVERP'}],
'success': True}
Use this in combination with Jon Ribbens' answer.
--
Terry Jan Reedy
--
https://mail.python.org/mailman/listinfo/python-list
On 8/17/2016 2:43 PM, Marko Rauhamaa wrote:
Terry Reedy :
On 8/17/2016 2:39 AM, Steven D'Aprano wrote:
"If I finish work on on time, go to the movies, otherwise just go home."
is also real English syntax, and to me, more graceful. It is certainly
more neutral among the alt
On 8/17/2016 2:39 PM, Random832 wrote:
On Wed, Aug 17, 2016, at 14:27, Terry Reedy wrote:
That particular syntax was not really considered. At least 10 versions
using 'if', 'then', 'else', and other tokens were.
They all had the problem of requiring a new keywor
On 8/17/2016 7:13 PM, Lawrence D’Oliveiro wrote:
On Thursday, August 18, 2016 at 8:25:37 AM UTC+12, Terry Reedy wrote:
for section_name, line_number in text.parser.toc:
def goto(line=line_number):
text.yview(line)
drop.add_command(label
those subject to the error get it right when they use
def in a loop or because they never use def in a loop.
--
Terry Jan Reedy
--
https://mail.python.org/mailman/listinfo/python-list
if (
not isinstance(src, Image)
or
mask != None and not isinstance(mask, Image)
or
not isinstance(dest, Image)
) :
raise TypeError("image args must be Image objects")
#end if
--
Terry Jan Reedy
--
https://mail.python.org/mailman/listinfo/python-list
ing.
If I try and write that to a file it fails with a UnicodeEncodeError.
If I write it with encode('utf8') it writes the file, but then it's no
longer a valid png file.
The data ceased representing a png image as soon as wrongfully decoded
as unicode text.
--
Terry Jan Reedy
--
https://mail.python.org/mailman/listinfo/python-list
n the test so that too many names, rather than too, are marked as
reserved? Better to say "don't use" for a good name rather than 'use'
for a reserved name.
--
Terry Jan Reedy
--
https://mail.python.org/mailman/listinfo/python-list
On 8/11/2016 11:55 PM, Lawrence D’Oliveiro wrote:
On Friday, August 12, 2016 at 2:25:05 AM UTC+12, Terry Reedy wrote:
When I read something like "Python finally acquired an event loop in
3.4" I wonder where people have been. The tk event loop has been in
Python perhaps for 2 decad
entation of Python 1 or 2 might have said 1 or True. Then your
'first divisor > 1' would be None. Not good.
--
Terry Jan Reedy
--
https://mail.python.org/mailman/listinfo/python-list
ow she is a witch?"
"She looks like one."
Given that people were once burned to death for 'looking like a witch'
(or sounding or acting), and can still suffer socially for such reasons,
this it not funny to me. We should stick with ducks.
--
Terry Jan Reedy
--
https://mail.python.org/mailman/listinfo/python-list
USBError(_strerror(ret), ret, _libusb_errno[ret])
usb.core.USBError: [Errno 10060] Operation timed out
What's wrong? How to fix?
Read (again?) the doc for the interface for the device. Because reading
timed out, I suspect that it is waiting for a command for it to send
something.
--
Terry Jan Reedy
--
https://mail.python.org/mailman/listinfo/python-list
On 8/28/2016 5:13 AM, Joe wrote:
Am 28.08.2016 um 00:45 schrieb Terry Reedy:
On 8/27/2016 3:35 PM, Joe wrote:
Hi,
I'm using Python 3.5.1 with PyUSB 1.0 under Win 10 (64). We try to read
the USB output of a DMM 'UT61B'.
import usb.core
import usb.util
import usb.backend.lib
n, such as 'almost
never', and then document the delayed import with comments either mixin
in with or below the real ones, such as
# import large_module # in almost_never
--
Terry Jan Reedy
--
https://mail.python.org/mailman/listinfo/python-list
https://www.youtube.com/watch?v=nRtp9NgtXiA
Jason Fried explains how he helped advance 'modern Python', 3.x, from
'impossible' in 2013 to the 'default for new code' today.
--
Terry Jan Reedy
--
https://mail.python.org/mailman/listinfo/python-list
On 9/6/2016 4:59 PM, US@f38.n261.z1 wrote:
I just installed Python 3.5.0 (since 3.5.2 would not installed on Windows 2008
R2) and tried the python --version command. Surprisingly, the command reported
2.5.4. What's going on?
Most likely you have 2.5.4 installed and are running it.
--
the python-list
manager/programmers, or more broadly, the mailman developers, to
recognize an 'end of message' line, such as '--end message--' and delete
it and anything appended thereafter. Then Joaquin and people in a
similar situation could add the magic line as the end of a si
red and frustrated and Ctrl-C'ed the process and ran it
again. This time it took about 15 seconds to complete.
For me, even less for the changes above.
--
Terry Jan Reedy
--
https://mail.python.org/mailman/listinfo/python-list
prising it does not
work. The re is also unnecessary. The following seems to do what you
want and is much simpler.
data = '''\
junk
more junk
^1\. upgrade
^2\. etc
'''
data = data[data.index(r'^1\.'):]
print(data)
#
^1\. upgrade
^2\. etc
--
Terry Jan Reedy
--
https://mail.python.org/mailman/listinfo/python-list
(and True otherwise) or
by defining a __len__ method that returns int 0 for falsey objects (and
non-0 ints otherwise). If a class defines both, __bool__ wins.
--
Terry Jan Reedy
--
https://mail.python.org/mailman/listinfo/python-list
x27;']
To put it slightly differently, regexes match slices. A string of n
chars has n+1 empty (len 0) slices - the 2 at the ends and the n-1
between chars.
--
Terry Jan Reedy
--
https://mail.python.org/mailman/listinfo/python-list
could check the .__file__ attribute of each module in sys.modules
for 'site-packages', (or more generally, for non-stdlib locations).
--
Terry Jan Reedy
--
https://mail.python.org/mailman/listinfo/python-list
ed. Could anybody let me know? Thanks.
It should be indexed on
https://docs.python.org/3/genindex-Symbols.html
but is not. I will try to remember to fix it.
--
Terry Jan Reedy
--
https://mail.python.org/mailman/listinfo/python-list
'. Accents indicate stress.
Other diacritics indicate other pronunciation changes. It is
counterproductive to confuse the two groups. Spanish, for instance, has
vowel accents that change which syllable gets stressed. A tilda is not
an accent; rather, it softens the pronunciation of &
e(256):
d[i] = chr(i)
or the dict comprehension
d = {i: chr(i) for i in range(256)}
this.
--
Terry Jan Reedy
--
https://mail.python.org/mailman/listinfo/python-list
ic'? I am sure that the long-time frequent
contributors on python list do not.
--
Terry Jan Reedy
--
https://mail.python.org/mailman/listinfo/python-list
mple 1 without the print() statement at the end, I get this
error :
for row in range(10):
for column in range(10):
print("*",end=" ")
These indents are 4 spaces and 1 tabs.
SyntaxError: inconsistent use of tabs and spaces in indentation
Because you mixed tabs and spaces. Has nothing to do with print statement.
--
Terry Jan Reedy
--
https://mail.python.org/mailman/listinfo/python-list
bs." It is the mixture in one piece of code that is the problem. The
tab in your original post has since be converted to (4) spaces. Tabs do
not survive in email, sometimes just being deleted.
--
Terry Jan Reedy
--
https://mail.python.org/mailman/listinfo/python-list
how asyncio
works.
--
Terry Jan Reedy
--
https://mail.python.org/mailman/listinfo/python-list
t('cell content = ', fcell.cell_contents)
# cell content = 23
fcell.cell_contents = 32
### results in
Traceback (most recent call last):
File "F:\Python\mypy\tem.py", line 14, in
fcell.cell_contents = 32
AttributeError: attribute 'cell_contents' of 'cell' objects is not writable
# unless one does so from within the closure body with 'nonlocal'
declaration. I presume there is a special byte code for this.
--
Terry Jan Reedy
--
https://mail.python.org/mailman/listinfo/python-list
hit. So I was hoping for a way to do
this with each iterator making only one complete pass through each
source (since they're sorted by common key).
It's somewhat similar to the *nix "join" command, only dealing with
N files.
It is also somewhat similar to a 3-way mergesort.
--
Terry Jan Reedy
--
https://mail.python.org/mailman/listinfo/python-list
elf._bval
def __next__(self):
try:
return next(self._it)
except StopIteration:
self._bval = False
raise
--
Terry Jan Reedy
--
https://mail.python.org/mailman/listinfo/python-list
On 9/29/2016 2:47 AM, Rustom Mody wrote:
On Thursday, September 15, 2016 at 1:43:05 AM UTC+5:30, Terry Reedy wrote:
On 9/14/2016 3:16 AM, Rustom Mody wrote:
In THOSE TYPES that element can justifiably serve as a falsey (empty) type
However to extrapolate from here and believe that ALL TYPES
(or [X]) I just retested with Win 10 Pro 64 3.6.0b1.
--
Terry Jan Reedy
--
https://mail.python.org/mailman/listinfo/python-list
you are familiar with tcl, you could potentially use root.call()
to call into tcl yourself.
There are other packages in Python that implement the idea of
broadcasting a change to a set of reistered listeners.
--
Terry Jan Reedy
--
https://mail.python.org/mailman/listinfo/python-list
On 10/1/2016 10:56 AM, Thorsten Kampe wrote:
ConfigParser escapes `\n` in ini values as `\\n`. Is there a way to
signal to ConfigParser that there is a line break?
Without an example or two, I don't really understand the question enough
to answer.
--
Terry Jan Reedy
--
nment,
so there may be multiple loop (comprehension) variables even without
nested loops.
--
Terry Jan Reedy
--
https://mail.python.org/mailman/listinfo/python-list
ed it.
No. By default, the working directory for a clone is for the default
branch. Any clone can be 'updated' to any branch. I have each share
clone updated to a different branch, so I never update to a different
branch.
--
Terry Jan Reedy
--
https://mail.python.org/mailman/
ort on making it possible to run code in a new editor
window without explicitly saving it.
--
Terry Jan Reedy
--
https://mail.python.org/mailman/listinfo/python-list
x27;
pygame == True and True has not attribute 'event'. Believe the error
messages until you have real reason to question them. They are perhaps
99.9% accurate by now/
--
Terry Jan Reedy
--
https://mail.python.org/mailman/listinfo/python-list
# in user process
exec(code, fake_main)
# stdout, stderr connect to IDLE process
--
Terry Jan Reedy
--
https://mail.python.org/mailman/listinfo/python-list
al to have variables not shadowed?
No, sometimes it is the right thing to do. Some warnings dependably
indicate something wrong. Some do not and are just a hint that maybe
you should think about what you did. Was it accidental (a typo) or
intentional?
--
Terry Jan Reedy
--
https://mail.python.o
to compile *all* python code. Leaving out
interaction with the OS and initialization, one could loosely define
CPython as exec(compile(open('x.py').read())).
--
Terry Jan Reedy
--
https://mail.python.org/mailman/listinfo/python-list
on in the 3.x docs. I did
not see mention in What New in 3.0, though. The change would certainly
be in the NEWS file that lists all commits. This is now reformatted
into an html changelog linked from What's New, but this started after in
3.0.
--
Terry Jan Reedy
--
https://mail.python.org/mailman/listinfo/python-list
repr(), while the change I observed was in str().
Since str(float) is now, I believe, the same as repr(float), it means
that in general, you have two possible changes to str ;-).
--
Terry Jan Reedy
--
https://mail.python.org/mailman/listinfo/python-list
On 10/12/2016 5:59 AM, mr.puneet.go...@gmail.com wrote:
# I created a platform class with different method in a file
> # and making it as a package.
class platform:
def connect(self):
# connect device
def destroy(self):
# destroy device
def config(self, command):
.
--
Terry Jan Reedy
--
https://mail.python.org/mailman/listinfo/python-list
so one call can interpolate multiple segments of a path.
Allow alt_value to be a list that is cycled through. Steps == None
means run forever.
Terry Jan Reedy
--
https://mail.python.org/mailman/listinfo/python-list
for x in iter:
for y in range(3):
ret.append((x, y))
return ret
temp(iter(range(y)))
Why is this? It seems rather curious.
Guido explained this somewhere some time ago.
Not sure it is documented very well.
In general, subordinate clauses depend on the initial loop
ht be evaluated more often (or
less, for that matter).
Only in extreme edge cases involving name scoping can the evaluation
of the first iterable depend on whether it's inside or outside the
invisible function.
ChrisA
--
Terry Jan Reedy
--
https://mail.python.org/mailman/listinfo/python-list
widget (other than the OS-supplied console).
--
Terry Jan Reedy
--
https://mail.python.org/mailman/listinfo/python-list
ange of programs. They just seem to be unwilling to
let it be it available in a simple, standard form.
The simple, standard form for Python, as well as for tcl, perl, and
ruby, is as tk events. Python accesses then via tkinter. Other
languages have their own version of the API.
> We are exp
e OSX and adopted by
other languages, including Python, to give the same access.
--
Terry Jan Reedy
--
https://mail.python.org/mailman/listinfo/python-list
p.
This sort of thing would be even nicer if and when tcl/tk gains support
for the full unicode character set so that all the non-BMP emoji are
potentially available. (A font supporting such would also be needed.)
--
Terry Jan Reedy
--
https://mail.python.org/mailman/listinfo/python-list
ude that if one uses tkinter to captures and process some
keyboard events, one should do so for all. Python's input should be
replaced by a tkinter simulation. I can think of a couple of ways this
might be implemented.
--
Terry Jan Reedy
--
https://mail.python.org/mailman/listinfo/python-list
On 10/27/2016 1:49 AM, Marko Rauhamaa wrote:
Terry Reedy :
On 10/26/2016 8:33 AM, Marko Rauhamaa wrote:
Maybe there should be some way to get the raw events from the PTY.
PTY? Must be Linux-specific. Most beginners are not on Linux.
A PTY is an emulated console (https://en.wikipedia.org
On 10/26/2016 9:12 PM, BartC wrote:
On 27/10/2016 00:30, Terry Reedy wrote:
Bart, you appear to have been fortunate enough to be spoiled by learning
programming on microcomputers, where the terminal and computer are
combined into one unit, so that the computer, and potentially the
programmer
systems. A key event includes widget name, key name (a single char for
char keys, a capitalized name otherwise), keycode, and x,y pixel
position of the mouse relative to the widget. A tkinter inkey()
function might work as follows:
#
dule, I would stick with returning either the character or a mostly
machine and OS independent name.
--
Terry Jan Reedy
--
https://mail.python.org/mailman/listinfo/python-list
b'30')
30
>>> int(b'30', 12)
36
>>> int.from_bytes(b'30', 'big')
13104
>>> int.from_bytes(b'30', 'little')
12339
--
Terry Jan Reedy
--
https://mail.python.org/mailman/listinfo/python-list
r x in alist if condition(x))
The parentheses around the generator expression are required here.
(Steven, I know you know that, but not everyone else will.)
--
Terry Jan Reedy
--
https://mail.python.org/mailman/listinfo/python-list
(t2b.repeat(number=500, repeat=7)))
#
t1a 0.5675313005414555
t1b 0.7034254675598604
t2a 0.518128598520
t2b 0.5196112759726024
If f does more work, the % difference among these will decrease.
--
Terry Jan Reedy
--
https://mail.python.org/mailman/listinfo/python-list
ing treated
as correct. The , could have been correct, so Python cannot know it is
incorrect here.
--
Terry Jan Reedy
--
https://mail.python.org/mailman/listinfo/python-list
-list is text only.
Definitely do this. A third possibility is that you saved a file with
the same name as an stdlib file in a place where it gets imported by
IDLE instead of the stdlib module. An error message should give a hint.
--
Terry Jan Reedy
--
https://mail.python.org/mailman/listinfo/python-list
isinstance(seq, (list, tuple)):
while not isinstance(seq, str) # or (str, bytes, ...)
dimension.append(len(seq))
try:
seq = seq[0]
except IndexError: # sequence is empty
break
return dimension
"""
Thorsten
bclasshook__', '__weakref__']
Is every 'x' being substituted out of existence?
In CPython, function local names are replaced by int indexes into a list
of objects, but still 'exist'. They are kept with the code object as a
list. It is used for printing locals() and for disassembly output. The
latter is deceptive in this regard if you do not know that the names are
substituted back for the indexes).
The local namespace, an attribute code does not have any default entries.
>>> def f(): print(locals())
>>> f()
{}
The code object itself and the function object that wraps a code object
both have numerous special-name attributes.
--
Terry Jan Reedy
--
https://mail.python.org/mailman/listinfo/python-list
On 11/17/2016 2:59 PM, Jelena Tavcar wrote:
How do I find stdlib files?
Python coded stdlib files are, at least on Windows, in /Lib
--
Terry Jan Reedy
--
https://mail.python.org/mailman/listinfo/python-list
On 11/21/2016 5:45 PM, BlindAnagram wrote:
Hi Jim,
...
thanks
Brian
'Brian', you sent this to python-list instead of Jim. If this is not
spam, try again with a different 'To:'
--
Terry Jan Reedy
--
https://mail.python.org/mailman/listinfo/python-list
ostimg.org/n7ol0mdpz/icon.png
This is set during installation. I *presume* (but know no details) that
icon file is loaded somewhat and appropriate registry setting connects
app to icon file.
--
Terry Jan Reedy
--
https://mail.python.org/mailman/listinfo/python-list
ess. You are on a Windows machine so if the
file is available on a local network node you can probably mount that node
(Computer/Map Network Drive) and access the file as something like
Z:/ninjatrader...
--
Terry Jan Reedy
--
https://mail.python.org/mailman/listinfo/python-list
-for.html
Note that updated 3.5.2+ code is in response to my comment.
--
Terry Jan Reedy
--
https://mail.python.org/mailman/listinfo/python-list
e but have
successfully written asyncio and async await code. Perhaps this is
because I have written tkinter code, including scheduling code with
root.after. The tk and asyncio event loops and scheduling are quite
similar.
--
Terry Jan Reedy
--
https://mail.python.org/mailman/listinfo/python-list
eError, ("The Python Cryptography Toolkit requires "
^
SyntaxError: invalid syntax
This is old 2.x Syntax, making this package not 3.x compatible.
--
Terry Jan Reedy
--
https://mail.python.org/mailman/listinfo/python-list
', which is to say, None.
if k in [0, len(n_trials) - 1]:
plt.xlabel("$p$, probability of heads")
--
Terry Jan Reedy
--
https://mail.python.org/mailman/listinfo/python-list
On 12/3/2016 7:31 PM, Chris Angelico wrote:
On Sun, Dec 4, 2016 at 11:10 AM, Terry Reedy wrote:
But the expression result isn't even used. So this is better written:
matplotlib.pyplot.xlabel sets x-axis scaling, with no documented return
value.
http://matplotlib.org/api/pyplot_api
be removed from the official web archive as it
contains defamatory material.
Reading the news.gmane.org mirror, I never received it.
--
Terry Jan Reedy
--
https://mail.python.org/mailman/listinfo/python-list
n official web archive:
https://mail.python.org/pipermail/python-list/
These slanderous posts, in particular, are hand-removed from the archive
when they get past the automatic filters. They are no more part of
python-list than other spam.
--
Terry Jan Reedy
--
https://mail.python.org/mailman/listinfo/python-list
On 12/10/2016 9:43 AM, Steve D'Aprano wrote:
On Sat, 10 Dec 2016 09:28 pm, Terry Reedy wrote:
The spammer will still be counted,
Why reward someone who actively evades defenses? If you want to count
spam, it is mostly missing, at least as far as python-list is concerned.
Its not a r
ing 'next_serial' as the class
attribute, as that is what the class attribute is. I would access it as
Box.serial.
Instance methods should normal be accessed through an instance, though
there are exceptions.
--
Terry Jan Reedy
--
https://mail.python.org/mailman/listinfo/python-list
27;m' would have been called a 'bound method', as opposed to an
unbound method. Since the latter were eliminated in 3.x, the adjective
is no longer needed.
--
Terry Jan Reedy
--
https://mail.python.org/mailman/listinfo/python-list
ny
additional information on this error, and suggestions for fixing it?
We have a teacher who needs this program on Windows 10 PCs for students to
use beginning January 3.
We appreciate that you are trying to use current Python to teach. I
hope we are able to solve the problem, given more info
On 12/15/2016 6:23 AM, skybuck2...@hotmail.com wrote:
Anyway... my ISP has problems accessing their newsserver. ...
If you want to read python-list as a news group, you might try
news.gmane.org. About once a year, it goes down for a few hours to a
day, but has otherwise been dependable. I
] # multiple references to one string
On a 64 bit OS, the latter would use 8 x defined codepoints (about
200,000) bytes. Assuming such does not already exits, it might be worth
making such a module available on PyPI.
http://www.unicode.org/Public/UCD/latest/ucd/ScriptExtensions.txt
Essentially, ditto, except that I would use a dict rather than a
sequence as there are only about 400 codepoints involved.
--
Terry Jan Reedy
--
https://mail.python.org/mailman/listinfo/python-list
l load quickly from a .pyc file. 4 or 8 bytes per
entry times 1 or 2 million entries is usually tolerable on a gigabyte
machine.
Or trade time for space with binary search or search in explicit binary
tree. Or combine binary search and indexed lookup as I did above.
--
Terry Jan Reedy
--
https://mail.python.org/mailman/listinfo/python-list
the name for sparse arrays. I cannot think of one for
blocks of duplicates.
--
Terry Jan Reedy
--
https://mail.python.org/mailman/listinfo/python-list
On 12/15/2016 2:04 PM, Ian Kelly wrote:
On Thu, Dec 15, 2016 at 11:05 AM, Terry Reedy wrote:
On 12/14/2016 11:14 PM, Thomas 'PointedEars' Lahn wrote:
According to
<https://docs.python.org/3/tutorial/classes.html#method-objects>,
“Foo.__init__” is _not_ an instance met
1401 - 1500 of 8120 matches
Mail list logo