Commits

Jorge Vargas  committed 8b0cdc1

lots of renames for order

  • Participants
  • Parent commits 3ded8a2

Comments (0)

Files changed (17)

File .DS_Store

Binary file added.

File 004 - Explicit is better than implicit..ipynb

+{
+ "metadata": {
+  "name": "004 - Explicit is better than implicit."
+ },
+ "nbformat": 3,
+ "nbformat_minor": 0,
+ "worksheets": [
+  {
+   "cells": [
+    {
+     "cell_type": "heading",
+     "level": 1,
+     "metadata": {},
+     "source": [
+      "Explicit is better than implicit."
+     ]
+    },
+    {
+     "cell_type": "code",
+     "collapsed": false,
+     "input": [
+      "chars = \"a,b,,\\n\"\n",
+      "regexp = \",|\\n\""
+     ],
+     "language": "python",
+     "metadata": {},
+     "outputs": []
+    },
+    {
+     "cell_type": "code",
+     "collapsed": false,
+     "input": [
+      "chars.split(\",\")"
+     ],
+     "language": "python",
+     "metadata": {},
+     "outputs": []
+    },
+    {
+     "cell_type": "code",
+     "collapsed": false,
+     "input": [
+      "s.split(regexp)"
+     ],
+     "language": "python",
+     "metadata": {},
+     "outputs": []
+    },
+    {
+     "cell_type": "code",
+     "collapsed": false,
+     "input": [
+      "import re\n",
+      "re.split(regexp,chars)"
+     ],
+     "language": "python",
+     "metadata": {},
+     "outputs": []
+    },
+    {
+     "cell_type": "heading",
+     "level": 1,
+     "metadata": {},
+     "source": [
+      "While in Java...."
+     ]
+    },
+    {
+     "cell_type": "raw",
+     "metadata": {},
+     "source": [
+      "String chars = \"a,b,,\\n\"\n",
+      "String regexp = \",|\\n\"\n",
+      " \n",
+      ">>> chars.split(\",\")\n",
+      "['a','b','\\n']\n",
+      ">>> chars.split(regexp)\n",
+      "['a','b']"
+     ]
+    },
+    {
+     "cell_type": "raw",
+     "metadata": {},
+     "source": [
+      "apologize in advance if the code above has bugs."
+     ]
+    }
+   ],
+   "metadata": {}
+  }
+ ]
+}

File 005 - Simple.ipynb

+{
+ "metadata": {
+  "name": "005 - Simple"
+ },
+ "nbformat": 3,
+ "nbformat_minor": 0,
+ "worksheets": [
+  {
+   "cells": [
+    {
+     "cell_type": "heading",
+     "level": 1,
+     "metadata": {},
+     "source": [
+      "Simple is better than complex.\n",
+      "Complex is better than complicated."
+     ]
+    },
+    {
+     "cell_type": "code",
+     "collapsed": false,
+     "input": [
+      "def parse_input(rawinput):\n",
+      "        if rawinput.startswith(\"//\"):\n",
+      "                delimiter_text,numbers= rawinput.split(\"\\n\",1)\n",
+      "                return delimiter_text[2:3],numbers\n",
+      "        else:\n",
+      "                return \",\",rawinput\n",
+      "delimiter,numbers=parse_input(\"//;\\n1;2\")\n",
+      "print delimiter\n",
+      "print numbers"
+     ],
+     "language": "python",
+     "metadata": {},
+     "outputs": [
+      {
+       "output_type": "stream",
+       "stream": "stdout",
+       "text": [
+        ";\n",
+        "1;2\n"
+       ]
+      }
+     ],
+     "prompt_number": 3
+    },
+    {
+     "cell_type": "code",
+     "collapsed": false,
+     "input": [
+      "import re"
+     ],
+     "language": "python",
+     "metadata": {},
+     "outputs": []
+    },
+    {
+     "cell_type": "markdown",
+     "metadata": {},
+     "source": [
+      "![regexp](http://cdn.memegenerator.net/instances/250x250/23687441.jpg)"
+     ]
+    },
+    {
+     "cell_type": "code",
+     "collapsed": false,
+     "input": [],
+     "language": "python",
+     "metadata": {},
+     "outputs": []
+    },
+    {
+     "cell_type": "code",
+     "collapsed": false,
+     "input": [],
+     "language": "python",
+     "metadata": {},
+     "outputs": []
+    }
+   ],
+   "metadata": {}
+  }
+ ]
+}

File 006 - Flat.ipynb

+{
+ "metadata": {
+  "name": "006 - Flat"
+ },
+ "nbformat": 3,
+ "nbformat_minor": 0,
+ "worksheets": [
+  {
+   "cells": [
+    {
+     "cell_type": "heading",
+     "level": 1,
+     "metadata": {},
+     "source": [
+      "Flat is better than nested. Sparse is better than dense. Readability counts."
+     ]
+    },
+    {
+     "cell_type": "code",
+     "collapsed": false,
+     "input": [
+      "choices = [(field.name, field.verbose_name) for field in obj._meta.fields\n",
+      "                    if field.attname.startswith('only') and field.attname not in exclude]\n",
+      "\n",
+      "        choices = []\n",
+      "        for field in Promotion._meta.fields:\n",
+      "            if field.attname.startswith('only') and field.attname not in exclude:\n",
+      "                choices.append((field.name, field.verbose_name))\n",
+      "                if obj:\n",
+      "                    if getattr(obj,field.name):\n",
+      "                        initial.append(field.name)"
+     ],
+     "language": "python",
+     "metadata": {},
+     "outputs": [
+      {
+       "ename": "NameError",
+       "evalue": "name 'obj' is not defined",
+       "output_type": "pyerr",
+       "traceback": [
+        "\u001b[0;31m---------------------------------------------------------------------------\u001b[0m\n\u001b[0;31mNameError\u001b[0m                                 Traceback (most recent call last)",
+        "\u001b[0;32m<ipython-input-2-d45db88b61b4>\u001b[0m in \u001b[0;36m<module>\u001b[0;34m()\u001b[0m\n\u001b[0;32m----> 1\u001b[0;31m choices = [(field.name, field.verbose_name) for field in obj._meta.fields\n\u001b[0m\u001b[1;32m      2\u001b[0m                     if field.attname.startswith('only') and field.attname not in exclude]\n",
+        "\u001b[0;31mNameError\u001b[0m: name 'obj' is not defined"
+       ]
+      }
+     ],
+     "prompt_number": 2
+    }
+   ],
+   "metadata": {}
+  }
+ ]
+}

File 007 - special cases.ipynb

+{
+ "metadata": {
+  "name": "007 - special cases"
+ },
+ "nbformat": 3,
+ "nbformat_minor": 0,
+ "worksheets": [
+  {
+   "cells": [
+    {
+     "cell_type": "heading",
+     "level": 1,
+     "metadata": {},
+     "source": [
+      "Special cases aren't special enough to break the rules."
+     ]
+    },
+    {
+     "cell_type": "code",
+     "collapsed": false,
+     "input": [
+      "def is_nombre(nombre):\n",
+      "\t\"\"\"Source developers.do/index.php/unit-testing-en-python/\"\"\"\n",
+      "\tnombre = nombre.replace(\" \",\"\")\n",
+      "\tif len(nombre) == 0:\n",
+      "\t\treturn False\n",
+      "\treturn nombre.isalpha()\n",
+      "\n",
+      "print is_nombre(\"\")"
+     ],
+     "language": "python",
+     "metadata": {},
+     "outputs": [
+      {
+       "output_type": "stream",
+       "stream": "stdout",
+       "text": [
+        "False\n"
+       ]
+      }
+     ],
+     "prompt_number": 9
+    },
+    {
+     "cell_type": "code",
+     "collapsed": false,
+     "input": [
+      "print \"\".isalpha()"
+     ],
+     "language": "python",
+     "metadata": {},
+     "outputs": [
+      {
+       "output_type": "stream",
+       "stream": "stdout",
+       "text": [
+        "False\n"
+       ]
+      }
+     ],
+     "prompt_number": 10
+    },
+    {
+     "cell_type": "code",
+     "collapsed": false,
+     "input": [
+      "def is_nombre(nombre):\n",
+      "    return nombre.isalpha()\n",
+      "\n",
+      "is_nombre(\"\")"
+     ],
+     "language": "python",
+     "metadata": {},
+     "outputs": [
+      {
+       "output_type": "pyout",
+       "prompt_number": 11,
+       "text": [
+        "False"
+       ]
+      }
+     ],
+     "prompt_number": 11
+    },
+    {
+     "cell_type": "code",
+     "collapsed": false,
+     "input": [
+      "construct = [0,'',\"\",None,[],{}]\n",
+      "for c in construct:\n",
+      "    print \"Element\\t:\\t{0}\\t Representation\\t:\\t{1}\\t bool({1})\\t:\\t{2}\\t \\tif({1})\\t:\\t{3}\\t\".format(c,repr(c),bool(c),bool(c)==True)\n"
+     ],
+     "language": "python",
+     "metadata": {},
+     "outputs": [
+      {
+       "output_type": "stream",
+       "stream": "stdout",
+       "text": [
+        "Element\t:\t0\t Representation\t:\t0\t bool(0)\t:\tFalse\t \tif(0)\t:\tFalse\t\n",
+        "Element\t:\t\t Representation\t:\t''\t bool('')\t:\tFalse\t \tif('')\t:\tFalse\t\n",
+        "Element\t:\t\t Representation\t:\t''\t bool('')\t:\tFalse\t \tif('')\t:\tFalse\t\n",
+        "Element\t:\tNone\t Representation\t:\tNone\t bool(None)\t:\tFalse\t \tif(None)\t:\tFalse\t\n",
+        "Element\t:\t[]\t Representation\t:\t[]\t bool([])\t:\tFalse\t \tif([])\t:\tFalse\t\n",
+        "Element\t:\t{}\t Representation\t:\t{}\t bool({})\t:\tFalse\t \tif({})\t:\tFalse\t\n"
+       ]
+      }
+     ],
+     "prompt_number": 32
+    },
+    {
+     "cell_type": "code",
+     "collapsed": false,
+     "input": [],
+     "language": "python",
+     "metadata": {},
+     "outputs": []
+    }
+   ],
+   "metadata": {}
+  }
+ ]
+}

File 008 - Although practicality beats purity..ipynb

+{
+ "metadata": {
+  "name": "008 - Although practicality beats purity."
+ },
+ "nbformat": 3,
+ "nbformat_minor": 0,
+ "worksheets": [
+  {
+   "cells": [
+    {
+     "cell_type": "heading",
+     "level": 1,
+     "metadata": {},
+     "source": [
+      "Although practicality beats purity."
+     ]
+    },
+    {
+     "cell_type": "code",
+     "collapsed": false,
+     "input": [
+      "import random\n",
+      "#some voodoo to make Django work from the command line\n",
+      "all_reviews=MattressReview.objects.filter(status=2).filter(rating__lte=2.5).values_list('id',flat=True)\n",
+      "print \"\\n\".join([(\"http://stage.goodbed.com/admin/reviews/mattressreview/%i\"%i) for i in random.sample(all_reviews,int(len(all_reviews)*0.1))])"
+     ],
+     "language": "python",
+     "metadata": {},
+     "outputs": []
+    },
+    {
+     "cell_type": "code",
+     "collapsed": false,
+     "input": [
+      "all_reviews = range(2*4*12*5)\n",
+      "print \"\\n\".join([(\"http://stage.goodbed.com/admin/reviews/mattressreview/%i\"%i) for i in random.sample(all_reviews,int(len(all_reviews)*0.1))])"
+     ],
+     "language": "python",
+     "metadata": {},
+     "outputs": []
+    },
+    {
+     "cell_type": "code",
+     "collapsed": false,
+     "input": [],
+     "language": "python",
+     "metadata": {},
+     "outputs": []
+    }
+   ],
+   "metadata": {}
+  }
+ ]
+}

File 009 - One way.ipynb

+{
+ "metadata": {
+  "name": "009 - One way"
+ },
+ "nbformat": 3,
+ "nbformat_minor": 0,
+ "worksheets": [
+  {
+   "cells": [
+    {
+     "cell_type": "heading",
+     "level": 1,
+     "metadata": {},
+     "source": [
+      "There should be one-- and preferably only one --obvious way to do it."
+     ]
+    },
+    {
+     "cell_type": "markdown",
+     "metadata": {},
+     "source": [
+      "Although that way may not be obvious at first unless you're Dutch.\n",
+      "\n",
+      "![Guido](http://upload.wikimedia.org/wikipedia/commons/thumb/6/66/Guido_van_Rossum_OSCON_2006.jpg/200px-Guido_van_Rossum_OSCON_2006.jpg)\n",
+      "\n",
+      "http://en.wikipedia.org/wiki/Guido_van_Rossum"
+     ]
+    },
+    {
+     "cell_type": "code",
+     "collapsed": false,
+     "input": [],
+     "language": "python",
+     "metadata": {},
+     "outputs": []
+    }
+   ],
+   "metadata": {}
+  }
+ ]
+}

File 010 - hard-implementation.ipynb

+{
+ "metadata": {
+  "name": "010 - hard-implementation"
+ },
+ "nbformat": 3,
+ "nbformat_minor": 0,
+ "worksheets": [
+  {
+   "cells": [
+    {
+     "cell_type": "markdown",
+     "metadata": {},
+     "source": [
+      "If the implementation is hard to explain, it's a bad idea.\n",
+      "==========================================================\n",
+      "\n",
+      "![hard_cards](cards.jpg) \n",
+      "\n",
+      "If the implementation is easy to explain, it may be a good idea.\n",
+      "=================================================================\n",
+      "\n",
+      "![easy_cards](cards2.jpg)"
+     ]
+    }
+   ],
+   "metadata": {}
+  }
+ ]
+}

File Although practicality beats purity..ipynb

-{
- "metadata": {
-  "name": "Although practicality beats purity."
- },
- "nbformat": 3,
- "nbformat_minor": 0,
- "worksheets": [
-  {
-   "cells": [
-    {
-     "cell_type": "heading",
-     "level": 1,
-     "metadata": {},
-     "source": [
-      "Although practicality beats purity."
-     ]
-    },
-    {
-     "cell_type": "code",
-     "collapsed": false,
-     "input": [
-      "import random\n",
-      "#some voodoo to make Django work from the command line\n",
-      "all_reviews=MattressReview.objects.filter(status=2).filter(rating__lte=2.5).values_list('id',flat=True)\n",
-      "print \"\\n\".join([(\"http://stage.goodbed.com/admin/reviews/mattressreview/%i\"%i) for i in random.sample(all_reviews,int(len(all_reviews)*0.1))])"
-     ],
-     "language": "python",
-     "metadata": {},
-     "outputs": []
-    },
-    {
-     "cell_type": "code",
-     "collapsed": false,
-     "input": [
-      "all_reviews = range(2*4*12*5)\n",
-      "print \"\\n\".join([(\"http://stage.goodbed.com/admin/reviews/mattressreview/%i\"%i) for i in random.sample(all_reviews,int(len(all_reviews)*0.1))])"
-     ],
-     "language": "python",
-     "metadata": {},
-     "outputs": []
-    },
-    {
-     "cell_type": "code",
-     "collapsed": false,
-     "input": [],
-     "language": "python",
-     "metadata": {},
-     "outputs": []
-    }
-   ],
-   "metadata": {}
-  }
- ]
-}

File Explicit is better than implicit..ipynb

-{
- "metadata": {
-  "name": "Explicit is better than implicit."
- },
- "nbformat": 3,
- "nbformat_minor": 0,
- "worksheets": [
-  {
-   "cells": [
-    {
-     "cell_type": "heading",
-     "level": 1,
-     "metadata": {},
-     "source": [
-      "Explicit is better than implicit."
-     ]
-    },
-    {
-     "cell_type": "code",
-     "collapsed": false,
-     "input": [
-      "chars = \"a,b,,\\n\"\n",
-      "regexp = \",|\\n\""
-     ],
-     "language": "python",
-     "metadata": {},
-     "outputs": []
-    },
-    {
-     "cell_type": "code",
-     "collapsed": false,
-     "input": [
-      "chars.split(\",\")"
-     ],
-     "language": "python",
-     "metadata": {},
-     "outputs": []
-    },
-    {
-     "cell_type": "code",
-     "collapsed": false,
-     "input": [
-      "s.split(regexp)"
-     ],
-     "language": "python",
-     "metadata": {},
-     "outputs": []
-    },
-    {
-     "cell_type": "code",
-     "collapsed": false,
-     "input": [
-      "import re\n",
-      "re.split(regexp,chars)"
-     ],
-     "language": "python",
-     "metadata": {},
-     "outputs": []
-    },
-    {
-     "cell_type": "heading",
-     "level": 1,
-     "metadata": {},
-     "source": [
-      "While in Java...."
-     ]
-    },
-    {
-     "cell_type": "raw",
-     "metadata": {},
-     "source": [
-      "String chars = \"a,b,,\\n\"\n",
-      "String regexp = \",|\\n\"\n",
-      " \n",
-      ">>> chars.split(\",\")\n",
-      "['a','b','\\n']\n",
-      ">>> chars.split(regexp)\n",
-      "['a','b']"
-     ]
-    },
-    {
-     "cell_type": "raw",
-     "metadata": {},
-     "source": [
-      "apologize in advance if the code above has bugs."
-     ]
-    }
-   ],
-   "metadata": {}
-  }
- ]
-}

File Flat.ipynb

-{
- "metadata": {
-  "name": "Flat"
- },
- "nbformat": 3,
- "nbformat_minor": 0,
- "worksheets": [
-  {
-   "cells": [
-    {
-     "cell_type": "heading",
-     "level": 1,
-     "metadata": {},
-     "source": [
-      "Flat is better than nested. Sparse is better than dense. Readability counts."
-     ]
-    },
-    {
-     "cell_type": "code",
-     "collapsed": false,
-     "input": [
-      "choices = [(field.name, field.verbose_name) for field in obj._meta.fields\n",
-      "                    if field.attname.startswith('only') and field.attname not in exclude]\n",
-      "\n",
-      "        choices = []\n",
-      "        for field in Promotion._meta.fields:\n",
-      "            if field.attname.startswith('only') and field.attname not in exclude:\n",
-      "                choices.append((field.name, field.verbose_name))\n",
-      "                if obj:\n",
-      "                    if getattr(obj,field.name):\n",
-      "                        initial.append(field.name)"
-     ],
-     "language": "python",
-     "metadata": {},
-     "outputs": [
-      {
-       "ename": "NameError",
-       "evalue": "name 'obj' is not defined",
-       "output_type": "pyerr",
-       "traceback": [
-        "\u001b[0;31m---------------------------------------------------------------------------\u001b[0m\n\u001b[0;31mNameError\u001b[0m                                 Traceback (most recent call last)",
-        "\u001b[0;32m<ipython-input-2-d45db88b61b4>\u001b[0m in \u001b[0;36m<module>\u001b[0;34m()\u001b[0m\n\u001b[0;32m----> 1\u001b[0;31m choices = [(field.name, field.verbose_name) for field in obj._meta.fields\n\u001b[0m\u001b[1;32m      2\u001b[0m                     if field.attname.startswith('only') and field.attname not in exclude]\n",
-        "\u001b[0;31mNameError\u001b[0m: name 'obj' is not defined"
-       ]
-      }
-     ],
-     "prompt_number": 2
-    }
-   ],
-   "metadata": {}
-  }
- ]
-}

File One way.ipynb

-{
- "metadata": {
-  "name": "One way"
- },
- "nbformat": 3,
- "nbformat_minor": 0,
- "worksheets": [
-  {
-   "cells": [
-    {
-     "cell_type": "heading",
-     "level": 1,
-     "metadata": {},
-     "source": [
-      "There should be one-- and preferably only one --obvious way to do it."
-     ]
-    },
-    {
-     "cell_type": "markdown",
-     "metadata": {},
-     "source": [
-      "Although that way may not be obvious at first unless you're Dutch.\n",
-      "\n",
-      "![Guido](http://upload.wikimedia.org/wikipedia/commons/thumb/6/66/Guido_van_Rossum_OSCON_2006.jpg/200px-Guido_van_Rossum_OSCON_2006.jpg)\n",
-      "\n",
-      "http://en.wikipedia.org/wiki/Guido_van_Rossum"
-     ]
-    },
-    {
-     "cell_type": "code",
-     "collapsed": false,
-     "input": [],
-     "language": "python",
-     "metadata": {},
-     "outputs": []
-    }
-   ],
-   "metadata": {}
-  }
- ]
-}
+How to get it running
+
+hg clone http://bitbucket.org/elpargo/pythondominicana002
+virtualenv venv
+source venv/bin/activate
+pip install -r requirements.txt
+open http://127.0.0.1:8888/

File Simple and Complex.ipynb

-{
- "metadata": {
-  "name": "Simple and Complex"
- },
- "nbformat": 3,
- "nbformat_minor": 0,
- "worksheets": [
-  {
-   "cells": [
-    {
-     "cell_type": "heading",
-     "level": 1,
-     "metadata": {},
-     "source": [
-      "Simple is better than complex."
-     ]
-    },
-    {
-     "cell_type": "heading",
-     "level": 1,
-     "metadata": {},
-     "source": [
-      "Complex is better than complicated."
-     ]
-    },
-    {
-     "cell_type": "code",
-     "collapsed": false,
-     "input": [],
-     "language": "python",
-     "metadata": {},
-     "outputs": []
-    }
-   ],
-   "metadata": {}
-  }
- ]
-}

File Simple.ipynb

-{
- "metadata": {
-  "name": "Simple"
- },
- "nbformat": 3,
- "nbformat_minor": 0,
- "worksheets": [
-  {
-   "cells": [
-    {
-     "cell_type": "heading",
-     "level": 1,
-     "metadata": {},
-     "source": [
-      "Simple is better than complex.\n",
-      "Complex is better than complicated."
-     ]
-    },
-    {
-     "cell_type": "code",
-     "collapsed": false,
-     "input": [
-      "def parse_input(rawinput):\n",
-      "        if rawinput.startswith(\"//\"):\n",
-      "                delimiter_text,numbers= rawinput.split(\"\\n\",1)\n",
-      "                return delimiter_text[2:3],numbers\n",
-      "        else:\n",
-      "                return \",\",rawinput\n",
-      "delimiter,numbers=parse_input(\"//;\\n1;2\")\n",
-      "print delimiter\n",
-      "print numbers"
-     ],
-     "language": "python",
-     "metadata": {},
-     "outputs": [
-      {
-       "output_type": "stream",
-       "stream": "stdout",
-       "text": [
-        ";\n",
-        "1;2\n"
-       ]
-      }
-     ],
-     "prompt_number": 3
-    },
-    {
-     "cell_type": "code",
-     "collapsed": false,
-     "input": [
-      "import re"
-     ],
-     "language": "python",
-     "metadata": {},
-     "outputs": []
-    },
-    {
-     "cell_type": "markdown",
-     "metadata": {},
-     "source": [
-      "![regexp](http://cdn.memegenerator.net/instances/250x250/23687441.jpg)"
-     ]
-    },
-    {
-     "cell_type": "code",
-     "collapsed": false,
-     "input": [],
-     "language": "python",
-     "metadata": {},
-     "outputs": []
-    },
-    {
-     "cell_type": "code",
-     "collapsed": false,
-     "input": [],
-     "language": "python",
-     "metadata": {},
-     "outputs": []
-    }
-   ],
-   "metadata": {}
-  }
- ]
-}

File hard-implementation.ipynb

-{
- "metadata": {
-  "name": "hard-implementation"
- },
- "nbformat": 3,
- "nbformat_minor": 0,
- "worksheets": [
-  {
-   "cells": [
-    {
-     "cell_type": "markdown",
-     "metadata": {},
-     "source": [
-      "If the implementation is hard to explain, it's a bad idea.\n",
-      "==========================================================\n",
-      "\n",
-      "![hard_cards](cards.jpg) \n",
-      "\n",
-      "If the implementation is easy to explain, it may be a good idea.\n",
-      "=================================================================\n",
-      "\n",
-      "![easy_cards](cards2.jpg)"
-     ]
-    }
-   ],
-   "metadata": {}
-  }
- ]
-}

File special cases.ipynb

-{
- "metadata": {
-  "name": "special cases"
- },
- "nbformat": 3,
- "nbformat_minor": 0,
- "worksheets": [
-  {
-   "cells": [
-    {
-     "cell_type": "heading",
-     "level": 1,
-     "metadata": {},
-     "source": [
-      "Special cases aren't special enough to break the rules."
-     ]
-    },
-    {
-     "cell_type": "code",
-     "collapsed": false,
-     "input": [
-      "def is_nombre(nombre):\n",
-      "\t\"\"\"Source developers.do/index.php/unit-testing-en-python/\"\"\"\n",
-      "\tnombre = nombre.replace(\" \",\"\")\n",
-      "\tif len(nombre) == 0:\n",
-      "\t\treturn False\n",
-      "\treturn nombre.isalpha()\n",
-      "\n",
-      "print is_nombre(\"\")"
-     ],
-     "language": "python",
-     "metadata": {},
-     "outputs": [
-      {
-       "output_type": "stream",
-       "stream": "stdout",
-       "text": [
-        "False\n"
-       ]
-      }
-     ],
-     "prompt_number": 9
-    },
-    {
-     "cell_type": "code",
-     "collapsed": false,
-     "input": [
-      "print \"\".isalpha()"
-     ],
-     "language": "python",
-     "metadata": {},
-     "outputs": [
-      {
-       "output_type": "stream",
-       "stream": "stdout",
-       "text": [
-        "False\n"
-       ]
-      }
-     ],
-     "prompt_number": 10
-    },
-    {
-     "cell_type": "code",
-     "collapsed": false,
-     "input": [
-      "def is_nombre(nombre):\n",
-      "    return nombre.isalpha()\n",
-      "\n",
-      "is_nombre(\"\")"
-     ],
-     "language": "python",
-     "metadata": {},
-     "outputs": [
-      {
-       "output_type": "pyout",
-       "prompt_number": 11,
-       "text": [
-        "False"
-       ]
-      }
-     ],
-     "prompt_number": 11
-    },
-    {
-     "cell_type": "code",
-     "collapsed": false,
-     "input": [
-      "construct = [0,'',\"\",None,[],{}]\n",
-      "for c in construct:\n",
-      "    print \"Element\\t:\\t{0}\\t Representation\\t:\\t{1}\\t bool({1})\\t:\\t{2}\\t \\tif({1})\\t:\\t{3}\\t\".format(c,repr(c),bool(c),bool(c)==True)\n"
-     ],
-     "language": "python",
-     "metadata": {},
-     "outputs": [
-      {
-       "output_type": "stream",
-       "stream": "stdout",
-       "text": [
-        "Element\t:\t0\t Representation\t:\t0\t bool(0)\t:\tFalse\t \tif(0)\t:\tFalse\t\n",
-        "Element\t:\t\t Representation\t:\t''\t bool('')\t:\tFalse\t \tif('')\t:\tFalse\t\n",
-        "Element\t:\t\t Representation\t:\t''\t bool('')\t:\tFalse\t \tif('')\t:\tFalse\t\n",
-        "Element\t:\tNone\t Representation\t:\tNone\t bool(None)\t:\tFalse\t \tif(None)\t:\tFalse\t\n",
-        "Element\t:\t[]\t Representation\t:\t[]\t bool([])\t:\tFalse\t \tif([])\t:\tFalse\t\n",
-        "Element\t:\t{}\t Representation\t:\t{}\t bool({})\t:\tFalse\t \tif({})\t:\tFalse\t\n"
-       ]
-      }
-     ],
-     "prompt_number": 32
-    },
-    {
-     "cell_type": "code",
-     "collapsed": false,
-     "input": [],
-     "language": "python",
-     "metadata": {},
-     "outputs": []
-    }
-   ],
-   "metadata": {}
-  }
- ]
-}