Skip to content

Instantly share code, notes, and snippets.

View Benjamin-Lee's full-sized avatar

Benjamin Lee Benjamin-Lee

View GitHub Profile
@ChenyangGao
ChenyangGao / ufcs.py
Last active February 5, 2024 15:20
Uniform Function Call Syntax (UFCS) for Python
'''
This module implements UFCS for Python.
[Uniform Function Call Syntax (UFCS)](https://tour.dlang.org/tour/en/gems/uniform-function-call-syntax-ufcs)
UFCS is a key feature of D and enables code reusability and scalability through well-defined encapsulation.
UFCS allows any call to a free function fun(a) to be written as a member function call a.fun().
If a.fun() is seen by the compiler and the type doesn't have a member function called fun(),
@bskinn
bskinn / intersphinx_mappings.txt
Last active May 3, 2024 09:39
Various intersphinx mappings
# The entries in this file are checked regularly for validity via the Github Action
# sited at github.com/bskinn/intersphinx-gist.
# Please feel free to post an issue at that repo if any of these mappings don't work for you,
# or if you're having trouble constructing a mapping for a project not listed here.
Python 3 [latest]: ('https://docs.python.org/3/', None)
Python 3 [3.x]: ('https://docs.python.org/3.9/', None)
attrs [stable]: ('https://www.attrs.org/en/stable/', None)
Django [dev]: ('https://docs.djangoproject.com/en/dev/', 'https://docs.djangoproject.com/en/dev/_objects/')
Flask [2.2.x]: ('https://flask.palletsprojects.com/en/2.2.x/', None)