Difference between {} and () when defining functions,classes, modules, etc. in Python
When you use {} then you are defining a set or a dictionary or a comprehension for a set or dict.
When you use () then you are defining a tuple, or a function, or a generator expression, or calling a function.
They are different parts of syntax that do different things - you can’t use them interchangeably.
Re: Difference between {} and () when defining functions,classes, modules, etc. in Py
so what have you got against index brackets, or did you leave them out because you didn't see the need to go the full monty, python
Re: Difference between {} and () when defining functions,classes, modules, etc. in Py
I'm not sure the reason for this post. This forum is primarily for users of Xara products. Your profile does not show any Xara products.
Are you calling someone out for incorrect punctuation? I'm confused here. Help me out. And do you even use brackets in Lahore?
Re: Difference between {} and () when defining functions,classes, modules, etc. in Py
If you were to publish this didactic Post in a Python forum, what do you think their response to it might be?
So far your Threads have had this attitude. TalkGraphics is about an exchange of ideas, you are presently on Transmit.
For this Post to make a difference for TG members in their design considerations, you need to explain the context of Python's use in those designs. Practical examples will help your case.
Acorn
Re: Difference between {} and () when defining functions,classes, modules, etc. in Py
it smacks of being lifted straight out of a tutorial/manual text
out of context it just states the obvious [ to a python programmer]