Skip to content

Instantly share code, notes, and snippets.

View Xion's full-sized avatar

Karol Kuczmarski Xion

View GitHub Profile
@Xion
Xion / playground.rs
Last active November 1, 2017 18:12 — forked from anonymous/playground.rs
Rust code shared from the playground
#[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> {
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::