{ "metadata": { "name": "" }, "nbformat": 3, "nbformat_minor": 0, "worksheets": [ { "cells": [ { "cell_type": "code", "collapsed": false, "input": [ "def f_no_positionals(*, this, that, the_other):\n", " print(this, \"|\", that, \"|\", the_other)" ], "language": "python", "metadata": {}, "outputs": [], "prompt_number": 1 }, { "cell_type": "code", "collapsed": false, "input": [ "f_no_positionals(\"first\", \"second\" \"third\")" ], "language": "python", "metadata": {}, "outputs": [ { "ename": "TypeError", "evalue": "f_no_positionals() takes 0 positional arguments but 2 were given", "output_type": "pyerr", "traceback": [ "\u001b[0;31m---------------------------------------------------------------------------\u001b[0m\n\u001b[0;31mTypeError\u001b[0m Traceback (most recent call last)", "\u001b[0;32m\u001b[0m in \u001b[0;36m\u001b[0;34m()\u001b[0m\n\u001b[0;32m----> 1\u001b[0;31m \u001b[0mf_no_positionals\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0;34m\"first\"\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0;34m\"second\"\u001b[0m \u001b[0;34m\"third\"\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0m", "\u001b[0;31mTypeError\u001b[0m: f_no_positionals() takes 0 positional arguments but 2 were given" ] } ], "prompt_number": 2 } ], "metadata": {} } ] }