Settings

Theme

A surprising Python quirk

willmcgugan.com

2 points by billowycoat 9 years ago · 3 comments

Reader

nanis 9 years ago

Nothing surprising about this if you know grade school math. Nor is it really about Python at all.

The empty set is a subset of every set.

  • billowycoatOP 9 years ago

    Are strings sets?

    • nanis 9 years ago

      Analogously, the empty net is a subnet of every net, the empty sequence is a subsequence of every sequence etc etc.

      Also, [p implies q] is vacuously true if p is false.

      Strings are maps from nonnegative integers to the space of characters. You can think of them as sets of ordered pairs or sequences.

Keyboard Shortcuts

j
Next item
k
Previous item
o / Enter
Open selected item
?
Show this help
Esc
Close modal / clear selection