By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
440,621 Members | 1,101 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 440,621 IT Pros & Developers. It's quick & easy.

stdlib doc for logger.findCaller() needs update.

P: n/a
The logger objects findCaller() method is returning a "3" element
tuple instead of "2" two as
documented in the 2.4.4 Python Library Reference .DocString is showing
it correctly.

findCaller()
Finds the caller's source filename and line number. Returns the
filename and line number as a 2-element tuple.

[jnair@sunazaki python]$ python
Python 2.4.4 (#1, Feb 2 2007, 17:43:17)
[GCC 3.4.3 20041212 (Red Hat 3.4.3-9.EL4)] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>import logging
logging.basicConfig()
logger = logging.getLogger()
help(logger.findCaller)
Help on method findCaller in module logging:

findCaller(self) method of logging.RootLogger instance
Find the stack frame of the caller so that we can note the source
file name, line number and function name.
>>logger.findCaller()
('<stdin>', 1, '?')
>>>
May 23 '07 #1
Share this Question
Share on Google+
4 Replies


P: n/a
On May 23, 12:05 pm, jitu...@hotmail.com wrote:
The logger objects findCaller() method is returning a "3" element
tuple instead of "2" two as
documented in the 2.4.4 Python Library Reference .DocString is showing
it correctly.
I've updated the docs - the next 2.4.x release should have them.
Thanks for the report.

Vinay Sajip

May 25 '07 #2

P: n/a
Vinay Sajip wrote:
On May 23, 12:05 pm, jitu...@hotmail.com wrote:
>The logger objects findCaller() method is returning a "3" element
tuple instead of "2" two as
documented in the 2.4.4 Python Library Reference .DocString is showing
it correctly.

I've updated the docs - the next 2.4.x release should have them.
Thanks for the report.
Is a further 2.4 release planned?

I'd have thought that unless a security issue appears the answer is
likely to be "no".

regards
Steve
--
Steve Holden +1 571 484 6266 +1 800 494 3119
Holden Web LLC/Ltd http://www.holdenweb.com
Skype: holdenweb http://del.icio.us/steve.holden
------------------ Asciimercial ---------------------
Get on the web: Blog, lens and tag your way to fame!!
holdenweb.blogspot.com squidoo.com/pythonology
tagged items: del.icio.us/steve.holden/python
All these services currently offer free registration!
-------------- Thank You for Reading ----------------
May 25 '07 #3

P: n/a
Vinay Sajip wrote:
On May 23, 12:05 pm, jitu...@hotmail.com wrote:
>The logger objects findCaller() method is returning a "3" element
tuple instead of "2" two as
documented in the 2.4.4 Python Library Reference .DocString is showing
it correctly.

I've updated the docs - the next 2.4.x release should have them.
Thanks for the report.
Is a further 2.4 release planned?

I'd have thought that unless a security issue appears the answer is
likely to be "no".

regards
Steve
--
Steve Holden +1 571 484 6266 +1 800 494 3119
Holden Web LLC/Ltd http://www.holdenweb.com
Skype: holdenweb http://del.icio.us/steve.holden
------------------ Asciimercial ---------------------
Get on the web: Blog, lens and tag your way to fame!!
holdenweb.blogspot.com squidoo.com/pythonology
tagged items: del.icio.us/steve.holden/python
All these services currently offer free registration!
-------------- Thank You for Reading ----------------

May 25 '07 #4

P: n/a
On May 25, 12:27 pm, Steve Holden <s...@holdenweb.comwrote:
>
Is a further 2.4 release planned?

I'd have thought that unless a security issue appears the answer is
likely to be "no".
You never know - and it didn't take long to commit the change to
release24-maint, so why not?!

Regards,

Vinay

May 25 '07 #5

This discussion thread is closed

Replies have been disabled for this discussion.