From 21642eb0545817abea04abd8f36cf735baf64e7b Mon Sep 17 00:00:00 2001 From: Stehlampe2020 <94976382+Stehlampe2020@users.noreply.github.com> Date: Sat, 5 Aug 2023 14:00:12 +0200 Subject: [PATCH] Update SPEC.md --- SPEC.md | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/SPEC.md b/SPEC.md index 5e47d4e..bfbf58e 100644 --- a/SPEC.md +++ b/SPEC.md @@ -1,6 +1,6 @@ # L2DB file format specification *If you want to make an alternative implementation of this format, use this document as a reference to ensure compatibility.* -- Version 1.1.0 +- Version 1.1.1 - Copyright (c) by Christian Lampe - If strings in this spec contain a variable name enclosed in double curly braces this means that that part of the string shouldn't be taken literally but instead replaced with the appropriate content, if not specified otherwise. @@ -166,8 +166,7 @@ If a specific type is given the values is converted to | Return value | `{'key':'','val':''}` | | A `dict` with the keys `key` and `val` which contains the given key and value as they were stored in the DB | Removes the given key along with its value from the DB. -If the key doesn't already exist, it raises a `L2DBKeyError` exception with the message `{{key}} could not be -found`, with `key` in single quotes and any contained single quotes escaped with a backslash. +If the key doesn't exist, it raises a `L2DBKeyError` exception with the key as an argument. ### `convert()` @@ -180,7 +179,7 @@ found`, with `key` in single quotes and any contained single quotes escaped with | Return value | | | The converted value | Converts the key along with its value to the target type, if that fails a `L2DBTypeError` exception should be raised -with the `key` name and `vtype` and if `fromval` is set `key` should be `None`. +with the `key` name and `vtype` as arguments and if `fromval` is set `key` should be `None`. If `fromval` is set the given `key` name is ignored and the value to convert is taken from `fromval` instead of the DB. If a `flt` is converted to any whole number type it simply loses its decimals (not rounded but cut off) and if any whole number type is converted to `flt` it gets 0 as the only decimal place. Examples: `1.999 -> 1`, `-3.7 -> 3` and