class A:
factory = dict
def method(self):
return self.factory()
a = A()
A.factory = list
print(a.method()) # []
class B:
factory = dict
def __init__(self):
self.factory = self.factory
def method(self):
return self.factory()
b = B()
B.factory = list
print(b.method()) # всё равно словарь: {}
[pfemidi@localhost ~]$ dnf info dialog
Last metadata expiration check: 0:00:30 ago on Mon 28 Oct 2019 08:02:00 PM MSK.
Available Packages
Name : dialog
Version : 1.3
Release : 16.20180621.fc30
Architecture : i686
Size : 234 k
Source : dialog-1.3-16.20180621.fc30.src.rpm
Repository : fedora
Summary : A utility for creating TTY dialog boxes
URL : https://invisible-island.net/dialog/dialog.html
License : LGPLv2
Description : Dialog is a utility that allows you to show dialog boxes (containing
: questions or messages) in TTY (text mode) interfaces. Dialog is called
: from within a shell script. The following dialog boxes are implemented:
: yes/no, menu, input, message, text, info, checklist, radiolist, and
: gauge.
:
: Install dialog if you would like to create TTY dialog boxes.
[pfemidi@localhost ~]$
Как обмануть нейросеть Яндекс.Музыки?никак