Skip to content

Commit

Permalink
Merge pull request #1212 from nrryuya/patch-5
Browse files Browse the repository at this point in the history
Remove the description of `None` from docs
  • Loading branch information
jacqueswww authored Jan 25, 2019
2 parents 1e44d05 + ee63f6a commit 6f0d5a1
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions docs/types.rst
Original file line number Diff line number Diff line change
Expand Up @@ -482,12 +482,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

0 comments on commit 6f0d5a1

Please sign in to comment.