Telegram Group & Telegram Channel
Сохраняем бинарные данные

Модуль pickle, который мы затронули в прошлом посте, реализует двоичные протоколы для сериализации и десериализации объектов. Вы можете сохранить любой объект, если возможно перевести каждый его атрибут в двоичный вид.

Но классы, функции и методы сохранить не получится. Здесь также важно понимать, что при сохранении объекта сохраняется строка, указывающая, к какому классу относится этот объект.

Однако будьте осторожнее, pickle не защищен от ошибочных или вредоносных данных. Никогда не извлекайте данные, полученные из ненадежных или не прошедших проверку подлинности источников.

#pickle



tg-me.com/python_academy/941
Create:
Last Update:

Сохраняем бинарные данные

Модуль pickle, который мы затронули в прошлом посте, реализует двоичные протоколы для сериализации и десериализации объектов. Вы можете сохранить любой объект, если возможно перевести каждый его атрибут в двоичный вид.

Но классы, функции и методы сохранить не получится. Здесь также важно понимать, что при сохранении объекта сохраняется строка, указывающая, к какому классу относится этот объект.

Однако будьте осторожнее, pickle не защищен от ошибочных или вредоносных данных. Никогда не извлекайте данные, полученные из ненадежных или не прошедших проверку подлинности источников.

#pickle

BY Python Academy




Share with your friend now:
tg-me.com/python_academy/941

View MORE
Open in Telegram


Python Academy Telegram | DID YOU KNOW?

Date: |

Start with a fresh view of investing strategy. The combination of risks and fads this quarter looks to be topping. That means the future is ready to move in.Likely, there will not be a wholesale shift. Company actions will aim to benefit from economic growth, inflationary pressures and a return of market-determined interest rates. In turn, all of that should drive the stock market and investment returns higher.

What Is Bitcoin?

Bitcoin is a decentralized digital currency that you can buy, sell and exchange directly, without an intermediary like a bank. Bitcoin’s creator, Satoshi Nakamoto, originally described the need for “an electronic payment system based on cryptographic proof instead of trust.” Each and every Bitcoin transaction that’s ever been made exists on a public ledger accessible to everyone, making transactions hard to reverse and difficult to fake. That’s by design: Core to their decentralized nature, Bitcoins aren’t backed by the government or any issuing institution, and there’s nothing to guarantee their value besides the proof baked in the heart of the system. “The reason why it’s worth money is simply because we, as people, decided it has value—same as gold,” says Anton Mozgovoy, co-founder & CEO of digital financial service company Holyheld.

Python Academy from hk


Telegram Python Academy
FROM USA