Skip to content

First release

Latest
Compare
Choose a tag to compare
@hakancelikdev hakancelikdev released this 24 Nov 19:38

Changelog

[0.1.0] - 2022-11-24

Added

  • DefineIf class is implemented, we can now use it via inheritance and decorators. For
    example:
import os

from defineif import DefineIf


class Klass(DefineIf):

    @staticmethod
    @DefineIf(os.name == 'nt')
    def get_platform():
        return 'Windows'

    @staticmethod
    @DefineIf(os.name == 'posix')
    def get_platform():
        return 'Linux'

platform = Klass.get_platform()

print(platform)