[issue30094] PDB enhancement

2021-04-23 Thread Sergey B Kirpichev


Change by Sergey B Kirpichev :


--
nosy: +Sergey.Kirpichev

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue30094] PDB enhancement

2017-04-18 Thread Raymond Hettinger

Changes by Raymond Hettinger :


--
nosy: +rhettinger

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue30094] PDB enhancement

2017-04-18 Thread Jim Fasarakis-Hilliard

Jim Fasarakis-Hilliard added the comment:

Dunno, if I wanted to see a nice formatted output of the internals I'd run `pp 
vars(obj)`. 

That, though, suffers a bit from the fact that `vars` is not the most known of 
the builtins.

--
nosy: +Jim Fasarakis-Hilliard
versions: +Python 3.7 -Python 3.5

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue30094] PDB enhancement

2017-04-18 Thread Erik Zoltan

New submission from Erik Zoltan:

I have created a pdb enhancement that allows me to query an object's internals 
more gracefully. It is incredibly useful and it would be very easy to include 
this logic in the distribution version of pdb. 

I created my own modification of pdb called zdebug (attached as zdebug.py) that 
implements a new ppp debugging command. This command prints a formatted output 
of an object's internals. It could be smoother, and doesn't fully obey the 
programming conventions used with in pdb, and I'm not proposing to submit it as 
a patch. However the ppp command is pretty simple and incredibly useful.  

Here's a tiny example. I can drill into an object, see its internals, and 
interactively explore its property chain. (The zdebug.zbreak() call is 
equivalent to pdb.set_trace()). 

$ python3
>>> from datetime import date
>>> today = date.today()
>>> import zdebug
>>> zdebug.zbreak()
--Return--
> (1)()->None
zdebug> p today
datetime.date(2017, 4, 18)
zdebug> ppp today
   ctime = 
   day = 18
   fromordinal = 
   fromtimestamp = 
   isocalendar = 
   isoformat = 
   isoweekday = 
   max = -12-31
   min = 0001-01-01
   month = 4
   replace = 
   resolution = 1 day, 0:00:00
   strftime = 
   timetuple = 
   today = 
   toordinal = 
   weekday = 
   year = 2017

zdebug> p today.day
18
zdebug> p today.year
2017

--
components: Library (Lib)
files: zdebug.py
messages: 291839
nosy: Erik Zoltan
priority: normal
severity: normal
status: open
title: PDB enhancement
type: enhancement
versions: Python 3.5
Added file: http://bugs.python.org/file46810/zdebug.py

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com