Search Results
Search type | Search syntax |
---|---|
Tags | [tag] |
Exact | "words here" |
Author |
user:1234 user:me (yours) |
Score |
score:3 (3+) score:0 (none) |
Answers |
answers:3 (3+) answers:0 (none) isaccepted:yes hasaccepted:no inquestion:1234 |
Views | views:250 |
Code | code:"if (foo != bar)" |
Sections |
title:apples body:"apples oranges" |
URL | url:"*.example.com" |
Saves | in:saves |
Status |
closed:yes duplicate:no migrated:no wiki:no |
Types |
is:question is:answer |
Exclude |
-[tag] -apples |
For more details on advanced search visit our help page |
Python is a dynamically typed, high-level interpreted programming language. Its design focuses on clear syntax, an intuitive approach to object-oriented programming, and making the right way to do things obvious. Python supports modules and exceptions, and has an extensive standard module library. Python is general-purpose and thus used widely, from the web to embedded systems.
89
votes
Accepted
Is it a good practice to declare instance variables as None in a class in Python?
I call the latter bad practice under the "this does not do what you think it does" rule.
Your coworker's position can be rewritten as: "I am going to create a bunch of class-static quasi-global varia …
0
votes
Should I store x,y coordinates as an array, a class object, or two variables?
I would take a look at namedtuple* class from the standard library. It's basically a automated way of subclassing a tuple with named proprties for corresponding to each field.
https://docs.python.or …