Skip to main content

This library writes object representations in a text file and reads the file to recreate the objects. An object representation is a string returned by function repr.

Project description

FRANÇAIS

Cette bibliothèque écrit des représentations d'objets dans un fichier texte et lit le fichier pour recréer les objets. Une représentation d'objet est une chaîne de caractères renvoyée par la fonction repr.

Contenu

La fonction write_reprs écrit des représentations d'objets dans un fichier texte. Chaque ligne du fichier est une représentation d'objet. Si le fichier spécifié existe déjà, cette fonction l'écrase.

Le générateur read_reprs lit un fichier texte contenant des représentations d'objets dans le but de recréer ces objets. Chaque ligne du fichier doit être une représentation d'objet. Les lignes vides sont ignorées. Chaque itération de ce générateur produit un objet.

Pour plus d'informations, consultez la documentation des fonctions et les démos dans le dépôt de code source.

ENGLISH

This library writes object representations in a text file and reads the file to recreate the objects. An object representation is a string returned by function repr.

Content

Function write_reprs writes object representations in a text file. Each line in the file is an object representation. If the specified file already exists, this function overwrites it.

Generator read_reprs reads a text file that contains object representations to recreate the objects. Each line in the file must be an object representation. Empty lines are ignored. Each iteration of this generator yields one object.

For more information, consult the functions' documentation and the demos in the source code repository.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

repr_rw-3.0.3.tar.gz (6.2 kB view details)

Uploaded Source

File details

Details for the file repr_rw-3.0.3.tar.gz.

File metadata

  • Download URL: repr_rw-3.0.3.tar.gz
  • Upload date:
  • Size: 6.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.11.4

File hashes

Hashes for repr_rw-3.0.3.tar.gz
Algorithm Hash digest
SHA256 1d05a1da545b51650c0f74e876b42d4c58e78393a9ce2c4ba9e4bcaea610c2a8
MD5 f7184c0e3c4494e002a6a6a0bfcfd230
BLAKE2b-256 75ea062c633a59e9f95d35bf23cf0b4d5d5fd6f963b0c4f9fa12cfa027ba48a3

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page