-2

I'm writing an custom logger and i have some doubts

Error example:

(
    <frame object at 0x7f92fc032420>,
    '/home/projects/zpy/private/lib/error.py',
    10,
    'log',
    ['\t\tstack = inspect.stack()\n'],
    0
)
  1. ?
  2. filename
  3. Code Line
  4. type?
  5. Code
  6. ?

Can you explain what are the 1,4 and 6 points?

thank you

4

1 回答 1

0

http://docs.python.org/2/library/inspect.html#the-interpreter-stack

When the following functions return “frame records,” each record is a tuple of six items:

  1. the frame object
  2. the filename
  3. the line number of the current line
  4. the function name
  5. a list of lines of context from the source code
  6. and the index of the current line within that list.

thanks to razpeitia

于 2013-10-30T20:01:28.390 回答