Note that there are some explanatory texts on larger screens.

plurals
  1. POIs False == 0 and True == 1 in Python an implementation detail or is it guaranteed by the language?
    primarykey
    data
    text
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. COIf you suspect it to be a detail, why not avoid the detail? Why ask a question like this? It's trivial to avoid depending on this kind of functionality. For your example, use a dictionary instead of a list. What problem are you having? Why ask this?
      singulars
    2. CO@S.Lott: There are many reasons to ask the question above. Thus, there are instances where relying on booleans being integer makes your code simpler: do you have to change it? Or, you might spot places in a code written by someone else that relies on booleans being integers: do you interrupt what you are modifying in the code in order to "fix" existing code, or can you rest assured that the current coding is sound? There is a plethora of other examples. More generally, it is good to know the rules of the game, so that you can play it well and program in a sound way.
      singulars
    3. CO@EOL: can you provide an example of "relying on booleans being integer makes your code simpler"? I can't imagine such a thing. " do you interrupt what you are modifying in the code in order to "fix" existing code, or can you rest assured that the current coding is sound?" The question seems technical, not "how do I cope?" The rules are simple: **don't depend on implementation details**. So why ask about an implementation detail?
      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