Has this been forgotten at Python development?

Apparently there was in earlier time option for :

import bool

similiar to programming language C with

#include<stdbool.h>

Have Python developers forgotten, to build bool into Python ?
Can this be ? : The lack of bool is causing “identation error” ?

There has never been a bool module in the standard library. There is a builtin type bool with two values: True and False.

1 Like

Hi Ron, ty for answer. How is builtin type bool defined for Python ?
Where can I find the source ?

For CPython (the main python implementation) the type is implemented in cpython/boolobject.c at master · python/cpython · GitHub.

If you are learning Python the documentation is probably more useful: Built-in Functions — Python 3.9.2 documentation

W.r.t. the the last question of your original post: There is not enough context in your post to answer your question. If the exception your getting is IndentationError the problem is with the textual structure of your code, that is incorrect indentation of lines.

I have a script here - it is short - not complex.

Is here somewhere a so-called “sandbox”, where we both can elaborate on this script ?

It is normally for “users”-forum - but this topic concerns core developement too.

Where can I post this snippet ? - Here ?

You can decide. I post it here - or at users forum.

Users forum is more trivial then the snippet of me.

Good. Just post it here, inline in your message between triple
backticks:

your programme
code here

That way everyone can see it.

And those of us using email instead of the web form can see it.

Also include your complete error output.

From the sounds of it, this is just a user issue, with nothing to do
with “core development”, which is a list about working on the CPython
implementation itself, not using it which is what you’re doing.

Cheers,
Cameron Simpson cs@cskk.id.au