r/PythonLearning • • Jun 11 '25

is int funtion nor working in vs?

So i wrote this code If i put an integer as an input it works But if i put in any non integer it doesnt seem to work at all Shows this error Can anyone help me understand my mistake

6 Upvotes

41 comments sorted by

View all comments

Show parent comments

2

u/PureWasian Jun 11 '25 edited Jun 11 '25

No need to be an ass to get your point across. int() is a constructor call, plain and simple. Neither a function nor a class.

EDIT: I will defer to this comment for the most proper explanation: https://www.reddit.com/r/PythonLearning/s/vrUtXaAxie

-1

u/Beautiful_Watch_7215 Jun 11 '25

Right. That’s why I stated with ‘seems like a function.’ But get terminal copy / paste nonsense. No need to be an ass, but can be for the fun of it.