Re: Clarification on Immutability please

2020-01-28 Thread Daniel Haude
Am 27.01.2020 15:23 schrieb Chris Angelico: The way execution works in Python, you first evaluate the object, then assign it to the target. The new object HAS to exist before the old one is replaced. There's no such thing as "atomic reassignment" that simultaneously destroys the old object and a

Re: Python3 - How do I import a class from another file

2019-12-11 Thread Daniel Haude
Am 10.12.2019 22:29 schrieb Chris Angelico: And once again, you are maintaining your assumptions despite being very clearly shown that they are wrong. "del instance" does not directly call __del__ any more than "instance = 1" does. You HAVE been shown. Much of the confusion in this thread come

Re: More efficient/elegant branching

2019-12-10 Thread Daniel Haude
Hello Neil, thanks for the detailed answer. Question: are there other people/factors who/which should be regarded as more important than the linter's opinion? Yes. Mine. I was just puzzled at the linter's output (took me a while to figure out what it actually meant), and that got me started

Writing SOME class methods in C

2015-11-17 Thread Daniel Haude
Hello, I'm trying to implement some (but not all) methods of a Python class in C. What I've found on the Net is: - how to implement entire modules in C so that I can import that module and use the C functions (successfully done it, too). - how to implement entire classes in C But I can't fin

(Windows) "Dropping" stuff onto a Python script

2008-11-06 Thread daniel . haude
Hello people, I'd like to have the functionality known from "real" executables that if I drag-drop a file icon on top of the app, the app starts and has the file's path as command-line argument. However, this doesn't seem to work with Python scripts because Windows sees those just as files, not a