PacktPublishing / Python-Programming-Blueprints

Python Programming Blueprints, published by Packt
MIT License
80 stars 57 forks source link

TypeError: object() takes no parameters #21

Closed kazishafi closed 3 years ago

kazishafi commented 4 years ago

having this result

Traceback (most recent call last): File "/home/b4ec8699db306d71b68ee45f60756296.py", line 10, in a = CSStudent(123) TypeError: object() takes no parameters

for giving following code

class CSStudent:

stream = 'cse'

def init(self, roll):

    self.roll = roll

a = CSStudent(123) b = CSStudent(456) c = CSStudent(789)

print(a.stream) print(b.stream) print(c.stream)

print(a.roll) print(b.roll) print(c.roll)

deepesh-packt commented 4 years ago

Hey @kazis12 , Can you please provide me the chapter number and its file name? It would be more helpful If you could provide a direct link to the code file where you are facing an error.

Do get in touch in case of any concerns.

Greetings!

deepesh-packt commented 3 years ago

Please reopen the issue if the issue still persists.