Skip to main content

Wat als je alleen maar Nederlandse woorden zou gebruiken voor python sleutel woorden?

Project description

pythonl

Wat als je alleen maar Nederlandse woorden zou gebruiken voor python sleutel woorden?

Hier is mijn idee daar van:

  • and: en
  • as: als
  • assert: eis
  • async: async
  • await: wachtop
  • break: stop
  • case: geval
  • class: klasse
  • continue: doorgaan
  • def: def
  • del: verwijder
  • if: indien
  • elif: andien
  • else: anders
  • except: behalve
  • False: Onwaar
  • finally: uiteindelijk
  • for: voor
  • from: van
  • global: globaal
  • import: importeer
  • in: in
  • is: is
  • lambda: lambda
  • match: vergelijk
  • None: Niets
  • nonlocal: nietlokaal
  • not: niet
  • or: of
  • pass: pas
  • raise: hef
  • return: retour
  • True: Waar
  • try: probeer
  • type: type
  • while: zolang
  • with: met
  • yield: lever

Voorbeeld

def lees_nummers(bestand_naam):
    nummers = []
    met open(bestand_naam) als bestand:
        voor lijn in bestand:
            probeer:
                nummers.append(int(lijn))
            behalve:
                doorgaan
    retour nummers

nummers = lees_nummers("nummers.txt")
print(nummers)

En je kan dit nog echt uitvoeren ook!

pythonl voorbeeld.pynl

Installatie

pip install pythonl 

Of installeer het van Github. In dat geval vergeet niet om de afhankelijkheden in requirements.txt te installeren. Dat is op dit moment alleen maar token_utils.

pip install -r requirements.txt

Dit project ondersteunt ook poetry. Dus je kan ook de afhankelijkheden installeren met poetry install waarna je poetry run pythonl kan uitvoeren om pythonl uit te voeren.

Interactie met Python code

Pythonl code in .pynl bestanden werkt naadloos samen met Python in .py bestanden. Je kan .py bestanden gewoon importeren in je .pynl bestanden. Zie hoofd.pynl:

importeer fiben
importeer fibnl

print("Fibonacci(7) uit Engelse module:", fiben.fibonacci(7))
print("Fibonacci(7) uit Nederlandse module:", fibnl.fibonacci(7))

eis fiben.fibonacci(7) == fibnl.fibonacci(7)

Als je dit uitvoert met pythonl krijg je:

$ pythonl ./hoofd.pynl
# Fibonacci(7) uit Engelse module: 13
# Fibonacci(7) uit Nederlandse module: 13

Interactieve Shell

Er is ook een werkende pythonl shell.

$ pythonl
Pythonl (0.1.0) interactive shell 3.10.12 (main, Jul 31 2024, 01:37:00) [GCC 11.4.0]
>>> 

🐍

$ ./pythonl ./pythonl.pynl ./hoofd.pynl
Fibonacci(7) uit Engelse module: 13
Fibonacci(7) uit Nederlandse module: 13

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

pythonl-0.1.0.tar.gz (18.1 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

pythonl-0.1.0-py3-none-any.whl (18.6 kB view details)

Uploaded Python 3

File details

Details for the file pythonl-0.1.0.tar.gz.

File metadata

  • Download URL: pythonl-0.1.0.tar.gz
  • Upload date:
  • Size: 18.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.8.2 CPython/3.10.12 Linux/6.9.3-76060903-generic

File hashes

Hashes for pythonl-0.1.0.tar.gz
Algorithm Hash digest
SHA256 c48c3a693b817daad2351fc37ab5c0d6926c9fccda696b56d0140c5be2da76f9
MD5 5fee957d86bada1591f878af4861eb1d
BLAKE2b-256 0284cef9e6c65bdfccc8136de71ff7e80a7824d7f0b35873bd2de57322d87e75

See more details on using hashes here.

File details

Details for the file pythonl-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: pythonl-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 18.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.8.2 CPython/3.10.12 Linux/6.9.3-76060903-generic

File hashes

Hashes for pythonl-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 e73b6fdbdedb29848cec404a17a01eb0e4921afd337a6d920851e719ee76c95b
MD5 50ba2b9832743efc4ca50c4278b2216e
BLAKE2b-256 3526f316c0be6750794220e9ae5d6cbabf1239d38bdbe721b8ed09bcd527a7f0

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