by: Olivier Lefevre |
last post by:
Python 2.3
>>> def foo():
.... foo.a = 1
....
>>> vars(foo)
{}
>>> foo()
>>> vars(foo)
{'a': 1}
>>>
|
by: Dan Perl |
last post by:
There is something with initializing mutable class attributes that I am
struggling with. I'll use an example to explain:
class Father:
attr1=None # this is OK
attr2= # this is wrong...
|
by: Adie |
last post by:
Hi, I wonder if anyone might lend me a brain.
I have a stock database to build that covers over 1000 products, which
might be said to exist in around 50 product families.
Obviously, just to be...
|
by: Jeff Kish |
last post by:
Just wondering if it was possible to xquery an xml file
to retrieve all elements that had a given text value
or all elements where any attribute had a value of interest.
I guess I could figure...
|
by: Matthew Wilson |
last post by:
I sometimes inadvertently create a new attribute on an object rather
update a value bound to an existing attribute. For example:
In : class some_class(object):
...: def __init__(self,...
|
by: Frank Millman |
last post by:
Hi all
I have a small problem. I have come up with a solution, but I don't
know if it is a) safe, and b) optimal.
I have a class with a number of attributes, but for various reasons I
cannot...
|
by: james_027 |
last post by:
hi everyone,
I am now in chapter 5 of Dive Into Python and I have some question
about it. From what I understand in the book is you define class
attributes & data attributes like this in python...
|
by: Nathan Harmston |
last post by:
Hi,
Sorry if the subject line of post is wrong, but I think that is what
this is called. I want to create objects with
class Coconuts(object):
def __init__(self, a, b, *args, **kwargs):...
|
by: tjhnson |
last post by:
Hi,
With properties, attributes and methods seem very similar. I was
wondering what techniques people use to give clues to end users as to
which 'things' are methods and which are attributes. ...
|
by: Rafe |
last post by:
Hi,
I'm working within an application (making a lot of wrappers), but the
application is not case sensitive. For example, Typing obj.name,
obj.Name, or even object.naMe is all fine (as far as...
|
by: Charles Arthur |
last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
|
by: aa123db |
last post by:
Variable and constants
Use var or let for variables and const fror constants.
Var foo ='bar';
Let foo ='bar';const baz ='bar';
Functions
function $name$ ($parameters$) {
}
...
|
by: ryjfgjl |
last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
|
by: emmanuelkatto |
last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud.
Please let me know.
Thanks!
Emmanuel
|
by: BarryA |
last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
|
by: nemocccc |
last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
|
by: Sonnysonu |
last post by:
This is the data of csv file
1 2 3
1 2 3
1 2 3
1 2 3
2 3
2 3
3
the lengths should be different i have to store the data by column-wise with in the specific length.
suppose the i have to...
|
by: Hystou |
last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
|
by: Oralloy |
last post by:
Hello folks,
I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>".
The problem is that using the GNU compilers,...
|