- Upvotes Received
- 2
- Posts with Upvotes
- 2
- Upvoting Members
- 2
- Downvotes Received
- 0
- Posts with Downvotes
- 0
- Downvoting Members
- 0
Re:
Once harm has been done, even a fool understands it. -- Homer |
|
Re:
My favourite movies is the harry potter series. What's yours? |
|
Hi Please take a look at [CODE=python] class ShortInputException(Exception): #QUESTION: Why do I have to inherit from the "Exception" class? def __init__(self, length, atleast): Exception.__init__(self) #QUESTION: Why do I have to add this? self.length = length self.atleast = atleast try: s = raw_input('Enter something --> ') if len(s) < 3: … |
|
Hi OK, so I am reading on OOP in Python, and I am an old C/C++ programmer so I have somewhat high expectations :). My question is regarding private/public variables. Per default, all class data members are public, but if we precede them with a double underscore, they become private. … |
|
Re:
Not to promote the use of alcohol, but it is in most places legal at least. Well I turned 21 a few months ago, so I'm wondering what everyone else drinks when relaxing on their off days? I like: Miller Lite Bud Light Other non-traditional (non-mass-produced) beers like dos equis, … |
|
Hi Everything in Python is treated as an object, so [CODE] i=5 i.imag [/CODE] makes sense, i.e. the variable [I]i[/I] has some associated methods. But why doesn't the following example work? [CODE] 5.imag #error [/CODE] One would think that it should work, since the integer "5" is an object just … |