Skip to content

Udiknedormin/nimpylib

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

15 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Nimpylib

Nimpylib is a collection of python-like operators and functions. It can help you to translate your Python program to Nim.

Also there's simple class macro similar to Python class (but without inheritance)

Nimpylib heavily relies on Nim generics, converters, operator overloading, and even on concepts

Example: Python-like range and print procedures:

import pylib
include pylib/range  # It's neccessary to include range module separately
let data = range(0, -10, -2)
echo data # @[0, -2, -4, -6, -8]
for i in range(10):
  print(i, endl = " ")  # 0 1 2 3 4 5 6 7 8 9

print("Hello,", input("What is your name? "), endl="\n~~~\n")

About

Python standard library functions ported to Nim

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Nim 100.0%