Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.python > #197041
| From | Greg Ewing <greg.ewing@canterbury.ac.nz> |
|---|---|
| Newsgroups | comp.lang.python |
| Subject | Re: super().__init__() and bytes |
| Date | 2024-12-04 12:14 +1300 |
| Message-ID | <lr9hm9F77vdU1@mid.individual.net> (permalink) |
| References | <3cc6272f-b151-474a-a83c-7f3339734bf5@roelschroeven.net> <ce4e0a1b-229a-48ad-b256-5835e0e509cc@roelschroeven.net> <VI1PR05MB106809E93AA17A3D46E380DFEB4362@VI1PR05MB10680.eurprd05.prod.outlook.com> <c5901834-52b0-4238-bda1-6b74220be68d@roelschroeven.net> <mailman.6.1733235899.2965.python-list@python.org> |
On 4/12/24 3:24 am, Roel Schroeven wrote: > It's not entirely clear to me though how bytes.__new__ *can* set an > object's value. Isn't __new__ also a regular function? Yes, but the __new__ methods of the builtin immutable objects (int, str, bytes, etc.) are implemented in C, and so are able to do things that Python methods cannot. -- Greg
Back to comp.lang.python | Previous | Next — Previous in thread | Next in thread | Find similar
Re: super().__init__() and bytes Roel Schroeven <roel@roelschroeven.net> - 2024-12-03 15:24 +0100
Re: super().__init__() and bytes Greg Ewing <greg.ewing@canterbury.ac.nz> - 2024-12-04 12:14 +1300
Re: super().__init__() and bytes Roel Schroeven <roel@roelschroeven.net> - 2024-12-04 12:38 +0100
csiph-web