TGTGInsighttelegram intelligenceLIVE / telegram public index
← Python Заметки

TGINSIGHT SIMILAR POSTS

Најди сличен содржај

Изворен канал @pythonotes · Post #418 · 9 мар.

Оператор pipe позволяет писать более компактный код, реализуя логику объединения данных (Union). Важно помнить, что его поведение зависит от контекста. Побитовые операции (логическое OR) result = 5 | 3 # 5 (0101) | 3 (0011) = 7 (0111) Самое главное - не путать с оператором or, это другое! Объединение множеств set_a = {1, 2, 3} set_b = {3, 4, 5} set_c = set_a | set_b # {1, 2, 3, 4, 5} set_c |= {5, 6} # {1, 2, 3, 4, 5, 6} Слияние словарей dict_1 = {"a": 1, "b": 2} dict_2 = {"b": 3, "c": 4} merged = dict_1 | dict_2 # {'a': 1, 'b': 3, 'c': 4} merged |= {"d": 5} # {'a': 1, 'b': 3, 'c': 4, 'd': 5} Аннотации типов, заменяет Union def process_data(value: int | str) -> None: print(value) Допустимо использовать в isinstance или issubclass isinstance(3, int | float) # True Паттерн-матчинг status_code = 404 match status_code: case 200 | 201 | 204: print("OK") case 400 | 404 | 500: print("ERROR") Для использования в своих классах требуется переопределить метод __or__ Так же нашел библиотеку pipe которая добавляет еще много возможностей. Рекомендую ознакомиться ;) #basic

Hashtags

Резултати

Пронајдени 6 слични објави

Пребарај: #referrals

当前筛选 #referrals清除筛选
BLC Market - mini-app BulCoin

@bulcoin_blc · Post #338 · 16.04.2026 г., 10:00

Now is the best time to enter BLC Market. Early stage project: - actively forming structure - interfaces are being published - new mechanics are opening up If you're already here - you're getting in ahead of most. Scaling will follow next. #community#referrals FAQ | BUY

🏆 Premium, NFT, Tokens

@Giiveaways · Post #2171 · 18.06.2024 г., 16:00

👥 The system of inviting friends to CITY Holder! 🏠🐹 With the invitation system you get in-game income not only for inviting friends, but also for their further development! The better your buddy's results, the higher your income. Combine strategies and show incredible results! #CITYHolder#Referrals https://t.me/cityholder🆕👈 °°°°°°

BLC Market - mini-app BulCoin

@bulcoin_blc · Post #278 · 07.03.2026 г., 12:00

Launching the BulCoin Referral Program We are starting a referral program for the early BulCoin community. Now every participant can invite friends to the project and receive additional bonuses. How it works: Invite your friends to the BulCoin channel Ask them to mention your username in the comments to this post Bonuses BLC are credited for invitations Rewards: • 3 invited — You join the private Pioneers chat • 10 invited — Bonus of 500,000 BLC • 25 invited — 3mln BLC + Participation in the BulCoin operational staff We will regularly publish the leaderboard — participants who have invited the most people. The best participants can receive additional rewards and a special status in the community. This is just the beginning of the formation of the BulCoin Early Community Invite your friends and help build the BulCoin community #Pioneers#Referrals FAQ | BUY

BLC Market - mini-app BulCoin

@bulcoin_blc · Post #336 · 12.04.2026 г., 10:00

Invitation mechanics in BLC Market There will be a separate section in the app through which you can invite new users. This will allow: — community to grow faster — build connections between members — increase activity within the platform We will show the interface in the upcoming updates. #profile#community#referrals FAQ | BUY

SingSing Announcement

@singsingchannel · Post #935 · 27.10.2024 г., 06:52

🎉 Invite Reward Boost! 🎉 Invite friends to join SingSing and earn 20 $KARA FREE for each successful invite (up from 10 $KARA)! 🔥 👥 The more, the merrier – stack up your $KARA effortlessly! 💸 Start inviting now and claim your rewards! #SingSing#KARA#Invite#Referrals 🎤Announcement | Chat | X (Twitter) | Website | Game