Search:
Help/Guide
About Trac
Preferences
Wiki
Timeline
Roadmap
Browse Source
View Tickets
Search
Context Navigation
←
Previous Change
Wiki History
Next Change
→
Changes between
Version 14
and
Version 15
of
Python
View differences
inline
side by side
Show
lines around each change
Show the changes in full context
Ignore:
Blank lines
Case changes
White space changes
Timestamp:
08/09/08 00:27:32 (
16 years
ago)
Author:
atzm
Comment:
--
Legend:
Unmodified
Added
Removed
Modified
Python
v14
v15
3
3
4
4
メモ.主に日記からの転載.
5
6
== 行番号を得る ==
7
[wiki:Perl Perl] で言うところの {{{__LINE__}}} みたいなもの.
8
スタックフレームを参照すれば良い.
9
{{{
10
#!python
11
import inspect
12
13
def lineno():
14
return inspect.currentframe().f_back.f_lineno
15
16
if __name__ == '__main__':
17
print lineno()
18
}}}
5
19
6
20
== 可変長引数 ==