Article View: comp.os.linux.misc
Article #1118Re: Back To CS Basics. Fuck AI
From: Lawrence D’Oliveiro
Date: Sun, 18 Oct 2026 21:59
Date: Sun, 18 Oct 2026 21:59
56 lines
3406 bytes
3406 bytes
On 18 Oct 2026 09:33:56 GMT, Stéphane CARPENTIER wrote:
> The issue wasn't about assigning a new dictionary to a variable, but
> adding some values in it. Some methods didn't worked for adding
> values if I didn't assign an empty dictionary or an empty list
> first, before doing anything on it.
Well, naturally, if you want to make a change to an object, that object
must a) be mutable, and b) exist in the first place.
E.g. appending to a list:
>>> a = None
>>> a.append("something")
Traceback (most recent call last):
File "<python-input-1>", line 1, in <module>
a.append("something")
^^^^^^^^
AttributeError: 'NoneType' object has no attribute 'append'
Naturally that doesn’t work, but
>>> a = []
>>> a.append("something")
>>> a
['something']
Naturally that works. Similarly
>>> a = None
>>> a["colour"] = "green"
Traceback (most recent call last):
File "<python-input-6>", line 1, in <module>
a["colour"] = "green"
~^^^^^^^^^^
TypeError: 'NoneType' object does not support item assignment
doesn’t work either, but
>>> a = {}
>>> a["colour"] = "green"
>>> a
{'colour': 'green'}
does work.
> I managed to do it with other programming languages. I managed to do
> it with python, to. In the end, it worked. But it was more
> cumbersome with python. I'm not saying that a programming language
> should be able to be used without being learned. I'm saying that
> it's not an easier language to use.
I’d be curious to see some more detail about what exactly the
situation was, if you can supply it. Maybe you were thinking in terms
of declaring variables of a prespecified type, when Python doesn’t
really have such a concept?
Technical Details
Message-ID:
<11b3fgl$1h3cv$4@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> <wwv33u4t9bq.fsf@LkoBDZeT.terraraq.uk> <6ad49284$0$28083$426a74cc@news.free.fr>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: Lawrence D’Oliveiro <ldo@nz.invalid> Newsgroups: comp.os.linux.misc,comp.lang.python Subject: Re: Back To CS Basics. Fuck AI Date: Sun, 18 Oct 2026 21:59:49 -0000 (UTC) Organization: A noiseless patient Spider Lines: 56 Message-ID: <11b3fgl$1h3cv$4@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> <wwv33u4t9bq.fsf@LkoBDZeT.terraraq.uk> <6ad49284$0$28083$426a74cc@news.free.fr> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Injection-Date: Sun, 18 Oct 2026 21:59:50 +0000 (UTC) Injection-Info: dont-email.me; logging-data="1609119"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX183YNITJzZ4rYHrx1qTuzO/"; posting-host="1bda0e8ab69ac83f664d6405d447ae0e" User-Agent: Pan/0.165 (Kostiantynivka) Cancel-Lock: sha1:qK6CFzHf12GPIK9c+50z1LXcZbw= sha256:mO18+9OU/5mly9NtSkEj81ZScZv4AmZ4/9ldRGcgKNc= sha1:UYYSw4Bz9KAAwasl0YyuYSiMS2k= sha256:6sPAAlAiq04PwoKw9EfP2nhgOuliHuNzEBLlmRiL8jI=