On Sep 16, 2016 8:12 PM, "Sharon Wallace" wrote:
>
In addition to showing us your code ,
Please show us whatever Trace back you got when you ran the code. I would
guess you are either getting an indentation error or syntax error in the
vicinity of line that begins if num =.
> inp = raw_input
>
>
On Fri, Sep 16, 2016 at 7:08 PM, Sharon Wallace
wrote:
> inp = raw_input
The above doesn't do what you think. It creates a name called inp
which is bound to the function raw_input
>
> largest = None
>
> smallest = None
>
>
>
> while True:
>
> num = raw_input('Enter a number: ')
>
>
inp = raw_input
largest = None
smallest = None
while True:
num = raw_input('Enter a number: ')
if num = 'done' : break
print num
try :
num = float(inp)
except :
D.V.N.Sarma డి.వి.ఎన్.శర్మ wrote:
> Can somebody tell me why my IDLE hangs when asked setrecursionlimit.
>
x=GetSet(40)
x.var
> 40
x.__dict__
> {'var': 40}
del x.var
x.__dict__
> {}
import sys
sys.setrecursionlimit(7)
IDLE's commandline emulation needs the stac
Can somebody tell me why my IDLE hangs when asked setrecursionlimit.
>>> x=GetSet(40)
>>> x.var
40
>>> x.__dict__
{'var': 40}
>>> del x.var
>>> x.__dict__
{}
>>> import sys
>>> sys.setrecursionlimit(7)
regards,
Sarma.
___
Tutor maillist - Tutor@pyth
monik...@netzero.net wrote:
>
> Hi:
> Below is code where mistakenly self.var is named the same as function var
> instead of a different name. I know that this is not correct but I was
> experimenting to see what happens.
> class GetSet():
GetSet is a classic class -- when you use properties w
Hi:
Below is code where mistakenly self.var is named the same as function var
instead of a different name. I know that this is not correct but I was
experimenting to see what happens.
class GetSet():
def __init__(self, value):
#self.attrval = value
self.var = value
@pro