Article View: comp.os.linux.advocacy
Article #920Re: Back To CS Basics. Fuck AI
From: John Bokma
Date: Sat, 17 Oct 2026 17:08
Date: Sat, 17 Oct 2026 17:08
66 lines
3892 bytes
3892 bytes
On 17/10/2026 19:01, John Bokma wrote:
> On 17/10/2026 18:46, Stéphane CARPENTIER wrote:
>
> [..]
>
>> With some typed languages, you can't use a variable if you didn't
>> declare it's type before. With python, you don't need to declare
>> integers and strings but you need to declare dictionaries. Why? Don't
>> know.
>
> I guess you confuse assigning a type with creating an object of a
> specific type.
>
>> With python, that looks easy and when I fix something, it breaks
>> something else for reasons I don't understand.
>
> I recommend to install Copilot CLI on your system and ask it to explain
> why your script breaks. It's quite good at explaining is my experience.
Examples:
Explain as a professional Python programmer why 1+True yields 2 and is valid
Thought for 3s
In Python,  bool is a subclass of  int . The two Boolean values behave
numerically as  False == 0 and  True == 1 , so adding  True to  1 is
equivalent to  1 + 1 :
1 + True # 2
type(1 + True) # int
It’s valid because Python’s numeric operations accept Boolean values as
integers. In application code, though, it’s usually clearer to convert
or count explicitly if you intend to use a Boolean as a number.
Why do I have to declare dictionaries but can use integers and strings
without declaring their type
Thought for 2s
In Python, you don’t have to declare a dictionary’s type. Python is
dynamically typed: a variable name refers to an object, and the object
carries its type.
count = 3 # creates an int object
message = "hello" # creates a str object
settings = {} # creates a dict object
Integers and strings have compact literal syntax (Â 3Â , Â "hello"Â );
dictionaries use  {} or key-value pairs, such as  {"theme": "dark"} .
That’s creating a dictionary, not declaring its type.
Type annotations are optional and mainly help readers and
static-analysis tools:
settings: dict[str, str] = {}
Can't recommend Copilot enough.
--
Static tumblelog generator: https://github.com/john-bokma/tumblelog/
Available as Python or Perl. Example tumblelog: https://plurrrr.com/
Technical Details
Message-ID:
<11b0a1q$du4m$1@dont-email.me>Path:
mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!usenet.blueworldhosting.com!diablo1.usenet.blueworldhosting.com!eternal-september.org!feeder.eternal-september.org!nntp.eternal-september.org!.POSTED!not-for-mailReferences:
<18dee4b6cab427fa$865$2574533$802601b3@news.usenetexpress.com> <11atgth$3e59h$1@dont-email.me> <18df0ea174d534e0$1613$2650862$802601b3@news.usenetexpress.com> <11atlpr$3g55c$1@dont-email.me> <11au66n$3m5co$6@dont-email.me> <11aucit$3o8ih$3@dont-email.me> <6ad34325$0$3147$426a74cc@news.free.fr> <wwv33u4o26s.fsf@LkoBDZeT.terraraq.uk> <6ad3a65d$0$31896$426a74cc@news.free.fr> <11b09ko$dn7j$1@dont-email.me>Show Full Headers
Complete Article Headers
Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!usenet.blueworldhosting.com!diablo1.usenet.blueworldhosting.com!eternal-september.org!feeder.eternal-september.org!nntp.eternal-september.org!.POSTED!not-for-mail From: John Bokma <contact@johnbokma.com> Newsgroups: comp.os.linux.misc,comp.os.linux.advocacy Subject: Re: Back To CS Basics. Fuck AI Date: Sat, 17 Oct 2026 19:08:09 +0200 Organization: A noiseless patient Spider Lines: 66 Message-ID: <11b0a1q$du4m$1@dont-email.me> References: <18dee4b6cab427fa$865$2574533$802601b3@news.usenetexpress.com> <11atgth$3e59h$1@dont-email.me> <18df0ea174d534e0$1613$2650862$802601b3@news.usenetexpress.com> <11atlpr$3g55c$1@dont-email.me> <11au66n$3m5co$6@dont-email.me> <11aucit$3o8ih$3@dont-email.me> <6ad34325$0$3147$426a74cc@news.free.fr> <wwv33u4o26s.fsf@LkoBDZeT.terraraq.uk> <6ad3a65d$0$31896$426a74cc@news.free.fr> <11b09ko$dn7j$1@dont-email.me> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit Injection-Date: Sat, 17 Oct 2026 17:08:11 +0000 (UTC) Injection-Info: dont-email.me; logging-data="456854"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX181R32lhYH41uNQ5es0a0nR3MXGIrn1OF0="; posting-host="1d4c32ffc66d22ef0e4cc39dbbcc54de" User-Agent: Mozilla Thunderbird Cancel-Lock: sha1:9pT09P2Cv+I/Ce1q2HwiPnysJ6E= sha256:yqty5Vbdpe3aTEUl5U2yW5KiS0ixiZZG/A8tXCukHZs= sha1:D5UXPdLkexNpOfLBkxOBpnm21s0= sha256:+/ZAZ6O1friBouAGwtY5jzQX5NVkmFlkWMHmEYp+HHI= In-Reply-To: <11b09ko$dn7j$1@dont-email.me> Content-Language: en-US