Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove the description of None from docs #1212

Merged
merged 2 commits into from
Jan 25, 2019
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions docs/types.rst
Original file line number Diff line number Diff line change
Expand Up @@ -483,12 +483,12 @@ Custom constants can be defined at a global level in Vyper. To define a constant
return MAX_SHARES * SHARE_PRICE


***********************
Initial Values and None
***********************
**************
Initial Values
**************

In Vyper, there is no ``null`` option like most programing languages have. Thus, every variable type has a default value.
Nevertheless Vyper has the option to declare ``None`` which represent the default value of the type. Note that there is no option to assign ``None`` when initiating a variable. Also, note that you can't make comparisons to None. In order to check if a variable is empty, you will need to compare it to its type's default value.
In Vyper, there is no ``null`` option like most programing languages have. Thus, every variable type has a default value. In order to check if a variable is empty, you will need to compare it to its type's default value.
If you would like to reset a variable to its type's default value, use the built-in ``clear()`` function.

Here you can find a list of all types and default values:

Expand Down