Python and Revit coding question

I’ve noticed sometimes the " are used and sometimes the ’ is used see below:

clr.AddReference(‘RevitNodes’)

clr.AddReference(“RevitNodes”)

is there a difference and if so I’m curious to know…I’m new to the Dynamo world and coding in general.

Thanks in advance.

Micheal,

you can use ’ or " in python but to be consistent, dont use both :slight_smile:

Thats what i was thinking but thanks for clearing that up. :slight_smile:

I would check the official documentation for Python. There are some rules to where you should be using single quotations and where to use double or triple.

With Dynamo part of the reason people use a mix of both is that when you try to do Python code inside of code block and then enclose the whole thing in quotation marks to feed it in as a string to Python node then you have to be careful to use double quotations everywhere.

Yes, normally its interchangeable, and consistency is the name of the game.

http://legacy.python.org/dev/peps/pep-0257/

1 Like

thanks for the input

check with…python docstring