Note that there are some explanatory texts on larger screens.

plurals
  1. USAbbafei
    primarykey
    data
    text
    plurals
    1. This table or related slice is empty.
    1. CO@JanusTroelsen I realize this :-). I actually had it the other way around (with True/False in the set and the iterable in the method param) at first, but realized that this would not work with infinite generators, and a user might not realize (since this fact is not (yet) mentioned in the docs for iterable set method params), and at least like this it is obvious that it will not take infinite iterators. I was aware of `itertools.tee` but 1) I was looking for a one-liner which was simple/small enough to warrant copy-pasting, 2) you already gave an answer which uses that technique :-)
      singulars
    2. COIn a nutshell, students probably do not understand because they do not understand correctly, or at all, how a computer's memory in general, and specifically [the C "memory model"](http://stackoverflow.com/a/897414/541412) works. This book [Programming from the Ground Up](http://savannah.nongnu.org/projects/pgubook/) gives a very good lesson on these topics.
      singulars
    3. COAlso: For a bit of an in-depth analysis of C pointers, see https://blogs.oracle.com/ksplice/entry/the_ksplice_pointer_challenge. Also, [Programming from the Ground Up](http://savannah.nongnu.org/projects/pgubook/) shows how they work on the machine level. Understanding [C's "memory model"](http://stackoverflow.com/a/897414/541412) is very useful for understanding how C pointers work.
      singulars
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload