Python r254 67916 Dec 23 2008 15 10 54 MSC 1310 32 bit Intel on win32

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
Python 2.5.4 (r254:67916, Dec 23 2008, 15:10:54) [MSC v.1310 32 bit (Intel)] on win32
Type "copyright", "credits" or "license()" for more information.
****************************************************************
Personal firewall software may warn about the connection IDLE
makes to its subprocess using this computer's internal loopback
interface. This connection is not visible on any external
interface and no data is sent to or received from the Internet.
****************************************************************
IDLE 1.2.4
>>> print 1.0.__add__(s)
Traceback (most recent call last):
File "<pyshell#0>", line 1, in <module>
print 1.0.__add__(s)
NameError: name 's' is not defined
>>> print 1.0.__add__(5)
6.0
>>> class User:
def __unit__(self, username):
self.username = username
self.password = ''
def setpass(self, value=""):
self.password = value
def checkpass(self, typed):
if typed == self.password:
return 1
else:
return 0
>>> u1 = User('Vasya)
SyntaxError: EOL while scanning single-quoted string
>>> ue = user('Vastya")
SyntaxError: EOL while scanning single-quoted string
>>> u1 = User('Vastya')
Traceback (most recent call last):
File "<pyshell#16>", line 1, in <module>
u1 = User('Vastya')
TypeError: this constructor takes no arguments
>>> ul = User('Vasya')
Traceback (most recent call last):
File "<pyshell#17>", line 1, in <module>
ul = User('Vasya')
TypeError: this constructor takes no arguments
>>> u1 = User('Vasya')
Traceback (most recent call last):
File "<pyshell#18>", line 1, in <module>
u1 = User('Vasya')
TypeError: this constructor takes no arguments
>>> u1 =