So, ipdb is the ipython version of pdb. In fact, post_mortem is a
pdb function. I use ipdb because its REPL is a bit nicer to work
with then pdb.
-Original Message-
From: Stefan Ram
Subject: Re: Drop into REPL when your program crashes.
Date: 09/08/2025 06:04:16 PM
Newsgroups: comp.lang.p
Annada Behera writes:
> Hi,
>
> Recently I have been increasingly adding this piece of code as
> a preamble to a lot of my code.
>
> import (sys, os, ipdb)
>
> def debug_hook(exc_type, exc_value, traceback):
> if exc_type is KeyboardInterrupt:
> sys.__excepthook__(exc_
Hi Steve, ask away...
On 11/09/25 16:15, Steve Jorgensen via Python-list wrote:
I posted a question here several days ago and received a "Welcome to the
"Python-list" mailing list!" email, but I still don't see my question in the list.
I'm posting this mainly to see if it shows up, or I get a
[email protected] (Pierre Asselin) writes:
> Ethan Carter wrote:
>
>> def __init__(self, d, ls):
>> self.head = d
>> self.tail = ls
>
> Why not
> def __init__(self, d, ls=None):
>
> and avoid the need for a List.Empty ?
Thanks! That's a good suggestion.
--
https://mail.pyt
For reasons I won't go into I ended up defining classes inside of
a class body. That's not in the manual, but I see no reason it would
fail.
But then, I accidentally decorated the inner classes with
@staticmethod! It didn't break anything, but it had an interesting
side effect: help() and pydoc on
I posted a question here several days ago and received a "Welcome to the
"Python-list" mailing list!" email, but I still don't see my question in the
list.
I'm posting this mainly to see if it shows up, or I get a reply from a
moderator, or something like that.
--
https://mail.python.org/mailm
Ethan Carter wrote:
> def __init__(self, d, ls):
> self.head = d
> self.tail = ls
Why not
def __init__(self, d, ls=None):
and avoid the need for a List.Empty ?
--
pa at panix dot com
--
https://mail.python.org/mailman3//lists/python-list.python.org
I've been experimenting to deepen my understanding of Python's behavior in
regard to metaclasses, descriptors, and other meta-programming stuff. In the
process, I have come across a behavior that is presumably by design but cannot
be inferred from anything I can find in the official documentatio
Hi,
Recently I have been increasingly adding this piece of code as
a preamble to a lot of my code.
import (sys, os, ipdb)
def debug_hook(exc_type, exc_value, traceback):
if exc_type is KeyboardInterrupt:
sys.__excepthook__(exc_type, exc_value, traceback)
r