[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH 08/12] qapi/schema: make QAPISourceInfo mandatory
From: |
Markus Armbruster |
Subject: |
Re: [PATCH 08/12] qapi/schema: make QAPISourceInfo mandatory |
Date: |
Fri, 18 Dec 2020 21:57:56 +0100 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/27.1 (gnu/linux) |
John Snow <jsnow@redhat.com> writes:
> On 12/18/20 12:24 AM, Markus Armbruster wrote:
>>> I could conceivably use source line information and stuff, to be
>>> needlessly fancy about it. Nah. I just think singleton patterns are kind
>>> of weird to implement in Python, so I didn't.
>> Stupidest singleton that could possibly work: in __init__,
>> self.singleton = ...
>>
>
> Yeah, you can make a class variable that has a builtin singleton, then
> make the class method return that class variable.
>
> Feels fancier than my laziness permits. I just put it back to using
> one copy per definition.
Why have a class method around the attribute? Just use the stoopid
attribute already ;-P
- Re: [PATCH 11/12] qapi/schema: Name the builtin module "" instead of None, (continued)
[PATCH 08/12] qapi/schema: make QAPISourceInfo mandatory, John Snow, 2020/12/14
- Re: [PATCH 08/12] qapi/schema: make QAPISourceInfo mandatory, Markus Armbruster, 2020/12/16
- Re: [PATCH 08/12] qapi/schema: make QAPISourceInfo mandatory, John Snow, 2020/12/16
- Re: [PATCH 08/12] qapi/schema: make QAPISourceInfo mandatory, Markus Armbruster, 2020/12/17
- Re: [PATCH 08/12] qapi/schema: make QAPISourceInfo mandatory, John Snow, 2020/12/17
- Re: [PATCH 08/12] qapi/schema: make QAPISourceInfo mandatory, Markus Armbruster, 2020/12/18
- Re: [PATCH 08/12] qapi/schema: make QAPISourceInfo mandatory, John Snow, 2020/12/18
- Re: [PATCH 08/12] qapi/schema: make QAPISourceInfo mandatory,
Markus Armbruster <=
- Re: [PATCH 08/12] qapi/schema: make QAPISourceInfo mandatory, John Snow, 2020/12/18
[PATCH 12/12] qapi: enable strict-optional checks, John Snow, 2020/12/14