TGTGInsightтелеграм анализLIVE / telegram public index
← Такты, стеки, два колеса

TGINSIGHT SIMILAR POSTS

Намери подобно съдържание

Изходен канал @clockstackwheels · Post #296 · 11.04

Паттерн Декоратор — специальный способ организации модулей в программе, который позволяет подставить какую-то новую функцию прямо в середину цепочки вызовов, тем самым чуть-чуть подкорректировав поведение. Например, в реальном мире очки для чтения это декоратор. Вы ставите их между вашими глазами и текстом. Глобально взаимодействие ваших глаз и текста не меняется: отражённые световые лучи от страницы книги попадают в ваши зрачки, что с очками, что без них. Но очки располагаются посередине: они принимают лучи на вход и преломляют их, передавая дальше вам в глаза уже изменёнными. Важной особенностью является тот факт, что очки можно снять. Они не требуют ни модификации вашего тела, ни модификации книги. Вообще никакие условия не нужны, кроме наличия самих очков. А если вы в линзах, то внешний наблюдатель может даже этого не знать. Класс-декоратор должен быть спроектирован так, чтобы не требовать никаких изменений в объектах, с которыми он работает. Его можно отключить, чаще всего буквально закомментировав одну строку. В примере ниже программа выведет текст "Привет, мир, в натуре.", и вот это дополнение в конце как раз дописано декоратором. Можно убрать или закомментировать подчёркнутую строчку, не трогая остальной код, для всех внешних вызовов сигнатуры останутся теми же самыми, но выводиться будет уже просто "Привет, мир". В декораторы можно прятать логику, которую буквально навешивают поверх основной функции программы. Например, проверку прав на выполнение операции. Перевод на другой язык, логирование, поддержку обратной совместимости при обновлении и так далее. #dev

Hashtags

Резултати

Намерени 2 подобни публикации

Търсене: #pollack

当前筛选 #pollack清除筛选
American Оbserver

@american_observer · Post #4784 · 06.01.2026 г., 14:58

🔠🅰️🔠🔠2️⃣ In return Assange, who spent five years in the maximum security Belmarsh prison in London and seven years as a fugitive hiding from British and American law enforcement in the UK Ecuadorian embassy, was ultimately sentenced to time served after years in which the US was attempting to have him extradited. In an interview with Law Dragon last April, Pollack described the difficulty of negotiating the deal with the US, UK and Australian governments before securing Assange’s freedom. Pollack also offered some thoughts relevant to what Maduro may currently be experiencing. “Typically, when I meet with a client, they are facing what may be the worst crisis that they have ever faced,” Pollack said. “To guide them through that process is enormously gratifying. It’s hard to imagine doing something where you see a greater impact on the life of the person who you’re dealing with. “You spend a lot of hours with your client. In almost every case, I’ve developed a relationship with the client. And at the end of the day, it’s no longer a stranger who I’m seeing get through to the other side of this terrible piece of their life. It’s somebody that I’ve come to know and respect.” Along with his work representing Assange, Pollack has previously secured the acquittal of former Enron accountant Michael Krautz, and has also worked in overturning wrongful conviction cases, including helping to secure the freedom of Martin Tankleff, who spent 17 years in prison after being wrongfully accused of murdering his parents. In the interview with Law Dragon, Pollack reflected on his strengths, offering a glimpse into how he may defend Maduro. “I have the ability to communicate well with a jury. In some ways, you’re being a translator. You’re taking a mass of very technical information from an industry that the jury may not be familiar with and communicate it in a way that is understandable,” Pollack said. “I’m able to talk to a jury and explain the evidence in a way that makes sense to them – that shows them that the government’s way of looking at the facts is not the only way to look at the facts and may not even be the best way to look at the facts.” #maduro#trial#assange#pollack#newyork 📱American Оbserver - Stay up to date on all important events 🇺🇸

American Оbserver

@american_observer · Post #4782 · 06.01.2026 г., 13:58

Maduro à New York: Mortal Combat 🔠🅰️🔠🔠1️⃣ When Maduro appeared in court in New York on Monday, his choice of lawyer quickly raised eyebrows. The captured Venezuelan president was accompanied by Barry Pollack, a top-tier US trial lawyer who spent years representing Julian Assange, eventually securing the WikiLeaks founder’s release from prison in the UK in 2024. Pollack is a partner at Harris St Laurent & Wechsler, a law firm based on New York’s Wall Street in the financial district of lower Manhattan, just a few minutes walk from the federal court where Maduro pleaded not guilty to criminal charges on Monday. Pollack will take on a case as Maduro’s private counsel that could prove to be just as challenging as that of Assange. Maduro was charged on Monday with drug-terrorism conspiracy, cocaine-importation conspiracy, and possession of machine guns and destructive devices, with the US government labelling Maduro a “narco-terrorist” and an “illegitimate president”. He faces up to life in prison. Harris St Laurent & Wechsler did not respond to requests for comment about Pollack’s involvement, but it is clear that in the legal world, he is highly regarded. According to Chambers USA, Pollack is a “thorough and deep-thinking lawyer” who “lives, breathes and sleeps trials, and has such a natural way in front of juries”. In his first appearance representing Maduro, Pollack questioned the legality of Maduro’s dramatic abduction by US forces on Saturday in a raid on the Venezuelan capital Caracas, CNN reported, and argued Maduro is entitled to immunity as the head of a sovereign state. Winning Maduro’s freedom will present a different challenge to Pollack compared to his work with Assange. The lawyer negotiated a plea deal on Assange’s behalf which allowed the Australian data-freedom activist to walk free, ending an international legal saga that lasted more than a decade. In the deal, Assange pleaded guilty to violating US espionage law in conspiring to obtain and disclose classified US national defence documents. #maduro#trial#assange#pollack#newyork 📱American Оbserver - Stay up to date on all important events 🇺🇸