Москва
Москва ваш город?
Да
Выбрать другой город
Написать в
WhatsApp
Написать в
Telegram
Каталог
Все категории
  • Все категории
  • Фотоаппараты
  • Объективы
  • Видеокамеры
  • Аксессуары к Фото и Видео
  • Аксессуары
  • Услуги тестирования и активации
  • Новинки
  • Акция

If your project currently triggers a DeprecationWarning when using ~ on a boolean, the fix is straightforward. Replace the bitwise operator with the logical not keyword:

is_active = True status = ~is_active # Returns -2, triggers warning Use code with caution. Copied to clipboard is_active = True status = not is_active # Returns False Use code with caution. Copied to clipboard Conclusion

Originally, the plan was to move toward a full error or a more aggressive deprecation schedule. However, Issue #122982 proposes . This extension serves a few key purposes: