by: Todd Johnson |
last post by:
Ok, say I have a class MyClass and an __init__(self,
a, b) Say that a and b are required to be integers
for example. So my init looks like:
__init__(self, a, b):
try:
self.one = int(a)...
|
by: Andrew James |
last post by:
All,
I'm having some trouble with understanding python's importing behaviour
in my application. I'm using psyco to optimise part of my code, but I'm
not sure whether it inherits throughout the...
|
by: marduk |
last post by:
I couldn't think of a good subject..
Basically, say I have a class
class Spam:
def __init__(self, x):
self.x = x
then if I create two instances:
|
by: Jeff Carver |
last post by:
I'm creating a class (using VB.NET) that must read data from a
database table during instantiation. If the data cannot be read
(connection problem, etc.), I want the instantiation to fail such...
|
by: tobiah |
last post by:
Suppose I do:
myfoo = Foo('grapes', 'oranges')
And in the __init__() of Foo, there is
a real problem with the consumption of fruit.
Is there a clean way to ensure that myfoo
will be None...
|
by: Colin J. Williams |
last post by:
In the example below, with the disassembly following that, we run into
trouble with the line:
self.connect(fileID, mode= 'r') # open sheet in the read mode
the traceback is:
Traceback...
|
by: glen.coates.bigworld |
last post by:
I'm developing a library at the moment that involves many classes, some
of which have "exposed" capabilities. I'm trying to design a nice
interface for both exposing those capabilities, and...
|
by: Ritesh Raj Sarraf |
last post by:
Hi,
I've been very confused about why this doesn't work. I mean I don't see any
reason why this has been made not to work.
class Log:
def __init__(self, verbose, lock = None):
if verbose...
|
by: Florian Loitsch |
last post by:
hi,
What should be the output of the following code-snippet?
===
var x = "global";
function f() {
var x = 0;
eval("function x() { return false; }");
delete x;
alert(x);
}
|
by: taylorcarr |
last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
|
by: Charles Arthur |
last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
|
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: 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: marktang |
last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
|
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: jinu1996 |
last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
|