аватар question@mail.ru · 01.01.1970 03:00

What does it mean ... (Troetogo) in Python?

I saw the following design:

   class   badtatus  ( Exception ):  ...     

What does it mean? Are there any differences from:

   class   Badstatus  ( Exception ):   pass    
аватар answer@mail.ru · 01.01.1970 03:00

Ellipsis Object or ... is a literal of a built -in constant ( ellipsis ). Like there is true , false , none , ...

... can be used where we have an empty body of a class or operator (instead of instead pass ),

i.e. It can be said to be empty here, but I will continue or then write.

   & gt; & gt; & gt;  ...   ellipsis    & gt; & gt; & gt;   type  (...)  & lt;  class   '' '' '"" Ellipsis'  & gt;   & gt; & gt; & gt;   bool  (...)   true                                        

Latest

Similar