« first day (1937 days earlier)      last day (1404 days later) » 

9:22 AM
@Permian: Re your question. You don't 'need' to use property at all, only when you want to prevent direct access to an attribute, i.e. override/hide its deller/getter/seller. And 'computed properties' only matter if you want to be able to access (say) person.fullname being person.firstname, lastname...
... But beware there are tons of bad Java-beans-style tutorials out there that will show you how to merrily write pagesful of accessors, making your humble class bloated beyond comprehensibility. Honestly, the Python philosophy on this is "less is more", use direct attribute access, don't write pagesful of rarely/never-used accessors, just because you can and because tutorials show you how to. Get the job done with the minimal number of custom accessor methods, ideally zero if possible.
...Refactor with a funky accessor only when it becomes obvious you have a strong need for that particular accessor. Until then, resist temptation to add them.
...General principle: get the actual job done correctly, first. Worry about aesthetics and refactoring second. At least as a beginner.
Second principle: beware tutorials/blogs/books, many of them suck, even if the author is famous. When they give advice that feels wrong, or unsubstantiated, maintain healthy skepticism. Especially if they're by people whose primary background was in some other language or paradigm, esp. Java.
 
5 messages moved from Python
 
@AndrasDeak: I wrote up many years of experience for Permian, on something severely non-obvious (whether Python 'property' is actually necessary) which is badly misserved by blogs/tutorials out there. Are we not supposed to respond, if the original question was good? I myself had the exact same question a few years ago, and that was after reading tons of doc and tutorials. Please let us know, deleting on-topic stuff summarily without reason is quite damaging.
 
9:38 AM
@smci Here's the reason: things are moved to the Knives for a reason. Take a hint.
2 messages moved from Python
 
9:59 AM
Your advice on the old 2008 question How to use Xpath in Python?. Should I tag it Python-2.x since most answers are 2.x, and severely dated at that? (there may well be a better 3.x question out there).
 
10:11 AM
3 messages moved from Python
 
 
2 hours later…
11:47 AM
good afternoon everyone, due to the css room being empty i come here to ask you for support in relation to the css, i'm trying to make a water drop effect, but so far i haven't been able to do that ... will it be possible to show me the right way? I already tested SVG shape element and Clip Path (Mask) CSS, but I couldn't get the format ... the idea would be to apply this effect to an image ... any ideas? did I explain the subject well?
 
1 message moved from Python
 
 
2 hours later…
wim
2:20 PM
@AnnZen The Dark Council removes stars occasionally if they are not expressing approved opinions.
 
1 message moved from Python
 
wim
voila!
 
1 message moved from Python
 
wim
@davidism what the kick for? making a joke?
 
1 message moved from Python
 
wim
2:37 PM
@AnnZen I can not answer you because davidism will kick me out of the room a third time. sorry.
 
1 message moved from Python
 

« first day (1937 days earlier)      last day (1404 days later) »