Skip to content

December 2023 ​

Romain CasatiDecember 22, 2023· in Python· 1 min read

Easter eggs suggested by students ​

Python already hides a few easter eggs (import this, import antigravity…). Students of NSI (computer science) imagined two new ones for Basthon, to enable with from basthon import __eastereggs__:

  • 1 + 1 is now 3;
  • a string can "call" a function: "hello world"(print).

Play with it!

Easter eggs


Romain CasatiDecember 8, 2023· in New modules, Python· 1 min read

Faker ​

Need data for an exercise on tables or databases? The Faker module, now available in Basthon's Python kernel, generates names, addresses, emails… more real than life, and in French too!

Play with it!

Faker


Romain CasatiDecember 8, 2023· in New modules, Python· 1 min read

geojson ​

The geojson module arrives in Basthon's Python kernel to handle geographic data in the GeoJSON format. It goes very well with folium to show them on a map!

Play with it!

geojson


Romain CasatiDecember 4, 2023· in Python· 1 min read

A documentation for the basthon module ​

The basthon module, available in the Python kernel, now has its own documentation, generated automatically from the code: display and download functions, self-assessment module…

Read the documentation

Documentation of the basthon module


Romain CasatiDecember 2, 2023· in Python· 2 min read

The self-assessment module ​

Basthon's Python kernel ships a basthon.autoeval module to test students' code automatically. For instance, ValidateFunction compares a function with a reference function on a series of values:

python
from basthon.autoeval import ValidateFunction

ValidateFunction("absolute_value", [-3, -1, 0, 2, 5], valid_function=abs)()

The module also offers ValidateVariables to check variables, and is the basis of the sequenced notebook.

Play with it!

Self-assessment