semvec/pypi-packages huggingface dataset:
leftdefault 2023.4.15
Support for default arguments on the left
Requires Python: >=3.8

leftdefault
===========

**Python package to put default before non-default arguments**

This tiny Python package contains a decorator `@leftdefault` which moves
positional-only default arguments to the beginning of the function signature.

Installation
------------

    pip install leftdefault

Usage
-----

Simply decorate functions with `@leftdefault` and delimit the arguments with
the positional-only indicator `/`:

```py
from leftdefault import leftdefault

@leftdefault
def myrange(stop, start=0, /, step=1):
    return (start, stop, step)

# now these are equivalent
myrange(4)
myrange(0, 4)
myrange(0, 4, 1)
```

Multiple default arguments can be moved to the left, they are filled from first
to last as usual:

```py
@leftdefault
def puttext(text, x=0., y=1., /, *args, **kwargs):
    return (x, y, text)

# now these are equivalent
puttext('hi')
puttext(0., 'hi')
puttext(0., 1., 'hi')
```

The `@leftdefault` decorator can take an optional `skip=N` keyword argument to
indicate that `N` initial positional-only arguments should be skipped.  This is
necessary for methods with `self`:

```py
class A:
    @leftdefault(skip=1)
    def rangemethod(self, stop, start=0, /, step=1):
        return (start, stop, step)
```

Inspection
----------

Left-defaulted functions come with the correct signature:

```py
>>> from inspect import signature
>>> signature(myrange)
<Signature (start=0, stop, /, step=1)>
>>> signature(puttext)
<Signature (x=None, y=None, text, /, *args, **kwargs)>
>>> signature(A.rangemethod)
<Signature (self, start=0, stop, /, step=1)>
```

These show up correctly in the usual places such as `help()`:

```py
>>> help(interval)

Help on function myrange:

myrange(start=0, stop, /, step=1)

>>> help(A.interval)

Help on function puttext:

puttext(x=None, y=None, text, /, *args, **kwargs)

```
PyIntellect 2023.1.1
Python code obfuscation tool
Keywords: obfuscate obfuscation distribute production tool

# PyIntellect
A CPythonic Python code obfuscation tool.
The usage will be via a command line interface.

## Features

- Single file obfuscation (currently limited to 5kb files until licenses are implemented)
- Module obfuscation (currently limited to 5kb files until licenses are implemented)
- Remove all comments
- Anti Python debugger
- Anti importing debugging packages
- Rename functions and classes
- Turn comments starting with `# pyintellect` into code. E.g. `# pyintellect print("test")` turns into `print("test")`.

## Planned Features / To Do
- Multiple modes of obfuscation (single file, with modules, etc.)
- Expire after a certain date

## Specialities
- PyIntellect preserves the __name\_\_ attribute.
- PyIntellect obfuscated files have a significant speed boost compared to other obfuscators.

## Supported Python Versions
- Python 3.11 only as of now, as I am currently focusing myself on the latest versions of Python.
- Python 3.12 soon
- Python 3.10 soon

## Supported Operating Systems
- Windows 10/11 only as of now.
- Linux soon.

## Installation

PyIntellect can be installed via pip:
`pip install pyintellect`

## Documentation
Documentation will be available on the [PyIntellect website](https://pyintellect.com). The website is currently under development.

## License
PyIntellect can be purchased over at: https://pyintellect.sell.app/product/pyintellect
PyIntellect can be used without a license, but a 5KB file limit will apply.