--- a/.emacs-my Mon Jan 18 17:07:56 2021 +0200
+++ b/.emacs-my Mon Jan 25 10:55:00 2021 +0200
@@ -3070,11 +3070,18 @@
(setq python-indent-offset 4)
-(defun my-python/describe-at-point (symbol process)
+(defun my-python/describe-at-point (symbol process prefix)
"Show full docs for symbol at point."
(interactive (list (python-info-current-symbol)
- (python-shell-get-process)))
- (let ( (cmd (concat "help('" symbol "')\n")) )
+ (python-shell-get-process)
+ current-prefix-arg))
+ (let ( (cmd
+ (cond
+ ((eq 1 prefix) (concat "type(" symbol ")\n"))
+ ((eq 2 prefix) (concat "vars(" symbol ")\n"))
+ ((eq 3 prefix) (concat "repr(" symbol ")\n"))
+ ((not prefix) (concat "help('" symbol "')\n"))
+ (t (concat "dir(" symbol ")\n")))) )
(switch-to-buffer (get-buffer-create (format "*pydoc: %s*" symbol)))
(fundamental-mode)
(read-only-mode -1)