[Tutor] Dataclass question

Albert-Jan Roskam sjeik_appie at hotmail.com
Fri Aug 23 15:15:04 EDT 2024


   On Aug 23, 2024 18:41, Mats Wichmann <mats at wichmann.us> wrote:

     The unittest module also has a shortener it uses, which is a little more
     general - it chops chars out from in between a prefix and suffix (you
     can give the length of each) and inserts a counter of how much was
     chopped in between, so you can get an output like <snip>

   ====
   Aah, thanks! I never thought about unittest. This looks
   useful: https://github.com/python/cpython/blob/bf1b5d323bdb6b1609c6f4b31dcaed621e5d0e2f/Lib/unittest/util.py#L45.
   Best wishes,
   Albert-Jan


More information about the Tutor mailing list