Untitled0



In [1]:
from flask import Flask, jsonify

In [3]:
app = Flask(__name__)

In [4]:
from flask import abort

@app.route('/todo/api/v1.0/tasks/<int:task_id>', methods = ['GET'])
def get_task(task_id):
    task = filter(lambda t: t['id'] == task_id, tasks)
    if len(task) == 0:
        abort(404)
    return "test"

In [5]:
app.run(debug = True)


An exception has occurred, use %tb to see the full traceback.

SystemExit: 1
To exit: use 'exit', 'quit', or Ctrl-D.

In [6]:
a


---------------------------------------------------------------------------
NameError                                 Traceback (most recent call last)
<ipython-input-6-0a87ab766c9c> in <module>()
----> 1 a

NameError: name 'a' is not defined

In [7]:
a = [1,2,3,4]

In [8]:
b = []

In [9]:
b = a

In [10]:
id(a)


Out[10]:
140688485157200

In [11]:
id(b)


Out[11]:
140688485157200

In [ ]: