You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@avro.apache.org by mg...@apache.org on 2022/11/04 08:37:49 UTC

[avro] branch branch-1.11 updated: AVRO-3659: Typo in python example (#1942)

This is an automated email from the ASF dual-hosted git repository.

mgrigorov pushed a commit to branch branch-1.11
in repository https://gitbox.apache.org/repos/asf/avro.git


The following commit(s) were added to refs/heads/branch-1.11 by this push:
     new c290b1146 AVRO-3659: Typo in python example (#1942)
c290b1146 is described below

commit c290b1146eb840d51c557f0cf438f77ea57983db
Author: Martin Grigorov <ma...@users.noreply.github.com>
AuthorDate: Fri Nov 4 09:37:15 2022 +0100

    AVRO-3659: Typo in python example (#1942)
    
    Fix the type of 'favorite_color' field.
    
    Signed-off-by: Martin Tzvetanov Grigorov <mg...@apache.org>
    
    Signed-off-by: Martin Tzvetanov Grigorov <mg...@apache.org>
    (cherry picked from commit 1834742813715a8d30aa38194481437174ed7776)
---
 doc/content/en/docs/++version++/Getting started (Python)/_index.md | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/doc/content/en/docs/++version++/Getting started (Python)/_index.md b/doc/content/en/docs/++version++/Getting started (Python)/_index.md
index ded4aca5d..d4a652f3e 100644
--- a/doc/content/en/docs/++version++/Getting started (Python)/_index.md	
+++ b/doc/content/en/docs/++version++/Getting started (Python)/_index.md	
@@ -128,7 +128,7 @@ We create a DataFileWriter, which we'll use to write serialized items to a data
 writer.append({"name": "Alyssa", "favorite_number": 256})
 writer.append({"name": "Ben", "favorite_number": 7, "favorite_color": "red"})
         
-We use DataFileWriter.append to add items to our data file. Avro records are represented as Python dicts. Since the field favorite_color has type ["int", "null"], we are not required to specify this field, as shown in the first append. Were we to omit the required name field, an exception would be raised. Any extra entries not corresponding to a field are present in the dict are ignored.
+We use DataFileWriter.append to add items to our data file. Avro records are represented as Python dicts. Since the field favorite_color has type ["string", "null"], we are not required to specify this field, as shown in the first append. Were we to omit the required name field, an exception would be raised. Any extra entries not corresponding to a field are present in the dict are ignored.
 
 ```python
 reader = DataFileReader(open("users.avro", "rb"), DatumReader())