Skip to content

Instantly share code, notes, and snippets.

Avatar

Karol Kuczmarski Xion

View GitHub Profile
@Xion
Xion / playground.rs
Last active Nov 1, 2017 — forked from anonymous/playground.rs
Rust code shared from the playground
View playground.rs
#[macro_use]
extern crate serde_derive;
extern crate toml;
use std::borrow::Cow;
use std::fs::File;
use std::io::Read;
#[derive(Debug, Serialize, Deserialize)]
pub struct Config<'a> {
View objectproperty.py
def objectproperty(func):
"""Alternate version of the standard ``@property`` decorator,
useful for proeperties that expose setter (or deleter) in addition to getter.
It allows to contain all two/three functions and prevent PEP8 warnings
about redefinion of ``x`` when using ``@x.setter`` or ``@x.deleter``.
Usage::
You can’t perform that action at this time.