Changed discussions of NULL to None to be more Pythonic.

This commit is contained in:
Donne Martin
2015-07-06 05:44:06 -04:00
parent 29685c7b35
commit 47e6a23dde
11 changed files with 55 additions and 55 deletions

View File

@@ -52,26 +52,26 @@
"\n",
"### Insert to Front\n",
"\n",
"* Insert a NULL\n",
"* Insert a None\n",
"* Insert in an empty list\n",
"* Insert in a list with one element or more elements\n",
"\n",
"### Append\n",
"\n",
"* Append a NULL\n",
"* Append a None\n",
"* Append in an empty list\n",
"* Insert in a list with one element or more elements\n",
"\n",
"### Find\n",
"\n",
"* Find a NULL\n",
"* Find a None\n",
"* Find in an empty list\n",
"* Find in a list with one element or more matching elements\n",
"* Find in a list with no matches\n",
"\n",
"### Delete\n",
"\n",
"* Delete a NULL\n",
"* Delete a None\n",
"* Delete in an empty list\n",
"* Delete in a list with one element or more matching elements\n",
"* Delete in a list with no matches\n",
@@ -191,7 +191,7 @@
" linked_list.insert_to_front(10)\n",
" assert_equal(linked_list.get_all_data(), [10])\n",
"\n",
" print('Test: insert_to_front on a NULL')\n",
" print('Test: insert_to_front on a None')\n",
" linked_list.insert_to_front(None)\n",
" assert_equal(linked_list.get_all_data(), [10])\n",
"\n",
@@ -208,7 +208,7 @@
" linked_list.append(10)\n",
" assert_equal(linked_list.get_all_data(), [10])\n",
"\n",
" print('Test: append a NULL')\n",
" print('Test: append a None')\n",
" linked_list.append(None)\n",
" assert_equal(linked_list.get_all_data(), [10])\n",
"\n",
@@ -225,7 +225,7 @@
" node = linked_list.find('a')\n",
" assert_equal(node, None)\n",
"\n",
" print('Test: find a NULL')\n",
" print('Test: find a None')\n",
" head = Node(10)\n",
" linked_list = LinkedList(head)\n",
" node = linked_list.find(None)\n",
@@ -251,7 +251,7 @@
" linked_list.delete('a')\n",
" assert_equal(linked_list.get_all_data(), [])\n",
"\n",
" print('Test: delete a NULL')\n",
" print('Test: delete a None')\n",
" head = Node(10)\n",
" linked_list = LinkedList(head)\n",
" linked_list.delete(None)\n",