Iterable - это объект по которому можно пройтись. Для питона это любой объект у которого есть метод __iter__ или __getitem__.
Чтобы преобразовать какой то объект в list, нужно проитерироваться по объекту, т.е. вызвать iter(iterable). Первым делом смотриться метод __iter__, если он возвращает iterator, то переберая все элементы итератора строиться list. Но если у объекта нет метода __iter__, но есть метод __getitem__, то создается iterator на основе этого метода. В метод __getitem__ по очередно передаются индексы (просто числа) от 0 до момента пока __getitem__ не выбросит ошибку StopIteration или IndexError.
Для чего это нужно? На самом деле это очень старый механизм и в реальности почти не нужный. Так называемая "legacy feature". Но может быть полезен, когда у вас есть какой то объект и вы хотите как то проитерироваться по нему.
class Library: def __init__(self, books: list): self.books = books
Iterable - это объект по которому можно пройтись. Для питона это любой объект у которого есть метод __iter__ или __getitem__.
Чтобы преобразовать какой то объект в list, нужно проитерироваться по объекту, т.е. вызвать iter(iterable). Первым делом смотриться метод __iter__, если он возвращает iterator, то переберая все элементы итератора строиться list. Но если у объекта нет метода __iter__, но есть метод __getitem__, то создается iterator на основе этого метода. В метод __getitem__ по очередно передаются индексы (просто числа) от 0 до момента пока __getitem__ не выбросит ошибку StopIteration или IndexError.
Для чего это нужно? На самом деле это очень старый механизм и в реальности почти не нужный. Так называемая "legacy feature". Но может быть полезен, когда у вас есть какой то объект и вы хотите как то проитерироваться по нему.
class Library: def __init__(self, books: list): self.books = books
Telegram and Signal Havens for Right-Wing Extremists
Since the violent storming of Capitol Hill and subsequent ban of former U.S. President Donald Trump from Facebook and Twitter, the removal of Parler from Amazon’s servers, and the de-platforming of incendiary right-wing content, messaging services Telegram and Signal have seen a deluge of new users. In January alone, Telegram reported 90 million new accounts. Its founder, Pavel Durov, described this as “the largest digital migration in human history.” Signal reportedly doubled its user base to 40 million people and became the most downloaded app in 70 countries. The two services rely on encryption to protect the privacy of user communication, which has made them popular with protesters seeking to conceal their identities against repressive governments in places like Belarus, Hong Kong, and Iran. But the same encryption technology has also made them a favored communication tool for criminals and terrorist groups, including al Qaeda and the Islamic State.
Importantly, that investor viewpoint is not new. It cycles in when conditions are right (and vice versa). It also brings the ineffective warnings of an overpriced market with it.Looking toward a good 2022 stock market, there is no apparent reason to expect these issues to change.