Bottom Page

Thread Rating:
  • 1 Vote(s) - 1 Average
  • 1
  • 2
  • 3
  • 4
  • 5
 when would a frozenset be needed?
#11
I see, however this well may be an error in the example code, given the comment
Quote: # at this point, *numbers* still has 1_000_000 key/values, and
# *numbers_without_997_multiples* is a copy of *numbers* without
# values that are multiples of 997.

i.e. copy definitely has changed
Quote
#12
so the author did not intend to del twice, didn't realize that 591221 would do that, and should have used just 500000 numbers in his example (or a pair of larger primes)?
What do you call someone who speaks three languages? Trilingual. Two languages? Bilingual. One language? American.
Quote
#13
I cannot be sure, but yes, it really looks like this.
Quote

Top Page

Possibly Related Threads...
Thread Author Replies Views Last Post
  frozenset.copy() docs wrong Skaperen 8 570 Apr-08-2020, 12:56 AM
Last Post: Skaperen

Forum Jump:


Users browsing this thread: 1 Guest(s)