On Feb 14, 1:50 am, Gabriel Genellina [EMAIL PROTECTED]
wrote:
En Wed, 13 Feb 2008 13:07:31 -0200, alain [EMAIL PROTECTED] escribió:
There exists an undocumented builtin called __file__, but
unfortunately no corresponding __line__
There is no __file__ builtin AFAIK; but there is __file__
On Feb 12, 7:44 pm, Jeff Schwab [EMAIL PROTECTED] wrote:
It still would be nice to have syntax as clean as __FILE__ and __LINE__.
There exists an undocumented builtin called __file__, but
unfortunately no corresponding __line__
Alain
--
http://mail.python.org/mailman/listinfo/python-list
alain wrote:
On Feb 12, 7:44 pm, Jeff Schwab [EMAIL PROTECTED] wrote:
It still would be nice to have syntax as clean as __FILE__ and __LINE__.
There exists an undocumented builtin called __file__, but
unfortunately no corresponding __line__
Drat! So close! Thanks for the info. Oh well,
En Wed, 13 Feb 2008 13:07:31 -0200, alain [EMAIL PROTECTED] escribió:
There exists an undocumented builtin called __file__, but
unfortunately no corresponding __line__
There is no __file__ builtin AFAIK; but there is __file__ module attribute
documented here:
On Feb 11, 10:58 am, Bill Davy [EMAIL PROTECTED] wrote:
Writing a quick and dirty assembler and want to give the user the location
of an error. The assembly language is Python. If the user wants to
generat some object code they write something like:
Label(LoopLable)
Load(R4)
Gabriel Genellina wrote:
En Tue, 12 Feb 2008 14:41:20 -0200, Jeff Schwab [EMAIL PROTECTED]
escribi�:
def line():
try:
raise Exception
except:
return sys.exc_info()[2].tb_frame.f_back.f_lineno
def file():
Gabriel Genellina wrote:
En Tue, 12 Feb 2008 16:20:12 -0200, Jeff Schwab [EMAIL PROTECTED]
escribió:
What about the following? Should the underscores be omitted from the
method names, for consistency with inspect?
I prefer the names_with_underscore, the current style recommended by
En Tue, 12 Feb 2008 16:20:12 -0200, Jeff Schwab [EMAIL PROTECTED]
escribió:
What about the following? Should the underscores be omitted from the
method names, for consistency with inspect?
I prefer the names_with_underscore, the current style recommended by
PEP8
Bill Davy wrote:
[...]
What a lovely langauge.
+1 QOTW
--
Steve Holden+1 571 484 6266 +1 800 494 3119
Holden Web LLC http://www.holdenweb.com/
--
http://mail.python.org/mailman/listinfo/python-list
En Tue, 12 Feb 2008 14:41:20 -0200, Jeff Schwab [EMAIL PROTECTED]
escribi�:
def line():
try:
raise Exception
except:
return sys.exc_info()[2].tb_frame.f_back.f_lineno
def file():
return
alain wrote:
On Feb 11, 10:58 am, Bill Davy [EMAIL PROTECTED] wrote:
Writing a quick and dirty assembler and want to give the user the location
of an error. The assembly language is Python. If the user wants to
generat some object code they write something like:
Label(LoopLable)
thebjorn [EMAIL PROTECTED] wrote in message
news:[EMAIL PROTECTED]
On Feb 11, 4:55 pm, Gary Herron [EMAIL PROTECTED] wrote:
Bill Davy wrote:
Writing a quick and dirty assembler and want to give the user the
location
of an error. The assembly language is Python. If the user wants to
On Feb 11, 4:55 pm, Gary Herron [EMAIL PROTECTED] wrote:
Bill Davy wrote:
Writing a quick and dirty assembler and want to give the user the location
of an error. The assembly language is Python. If the user wants to
generat some object code they write something like:
Label(LoopLable)
Bill Davy wrote:
Writing a quick and dirty assembler and want to give the user the location
of an error. The assembly language is Python. If the user wants to
generat some object code they write something like:
Label(LoopLable)
Load(R4)
Dec()
JNZ(LoopLabel)
I can use
Writing a quick and dirty assembler and want to give the user the location
of an error. The assembly language is Python. If the user wants to
generat some object code they write something like:
Label(LoopLable)
Load(R4)
Dec()
JNZ(LoopLabel)
I can use Python to do all the
15 matches
Mail list logo