معرفی شرکت ها


ScopeFormatter-1.0.3


Card image cap
تبلیغات ما

مشتریان به طور فزاینده ای آنلاین هستند. تبلیغات می تواند به آنها کمک کند تا کسب و کار شما را پیدا کنند.

مشاهده بیشتر
Card image cap
تبلیغات ما

مشتریان به طور فزاینده ای آنلاین هستند. تبلیغات می تواند به آنها کمک کند تا کسب و کار شما را پیدا کنند.

مشاهده بیشتر
Card image cap
تبلیغات ما

مشتریان به طور فزاینده ای آنلاین هستند. تبلیغات می تواند به آنها کمک کند تا کسب و کار شما را پیدا کنند.

مشاهده بیشتر
Card image cap
تبلیغات ما

مشتریان به طور فزاینده ای آنلاین هستند. تبلیغات می تواند به آنها کمک کند تا کسب و کار شما را پیدا کنند.

مشاهده بیشتر
Card image cap
تبلیغات ما

مشتریان به طور فزاینده ای آنلاین هستند. تبلیغات می تواند به آنها کمک کند تا کسب و کار شما را پیدا کنند.

مشاهده بیشتر

توضیحات

Format a string using names in the current scope.
ویژگی مقدار
سیستم عامل OS Independent
نام فایل ScopeFormatter-1.0.3
نام ScopeFormatter
نسخه کتابخانه 1.0.3
نگهدارنده []
ایمیل نگهدارنده []
نویسنده Luke Stebbing
ایمیل نویسنده luke@lukestebbing.com
آدرس صفحه اصلی http://pypi.python.org/pypi/ScopeFormatter
آدرس اینترنتی https://pypi.org/project/ScopeFormatter/
مجوز MIT
ScopeFormatter allows Python's string formatting to be used with names drawn from the current scope, similar to the variable interpolation found in languages such as Ruby and Perl. .. contents:: Examples -------- >>> from scopeformatter import F >>> greeting = 'Hello' >>> def greet(name): ... return F('{greeting}, {name}!') >>> greet('world') 'Hello, world!' Positional and keyword arguments are accepted: >>> F('{greeting} {0} times, {name}!', len(greeting), name='world') 'Hello 5 times, world!' Requirements ------------ The stack inspection requires a Python VM that provides ``sys._getframe()``, such as CPython. Limitations ----------- Non-global names from enclosing scopes will not be found unless they are referenced in the local scope. >>> def outer(): ... non_local = 'non-local' ... def inner(): ... return F('{non_local} is not referenced locally') ... return inner() >>> outer() Traceback (most recent call last): ... KeyError: 'non_local' >>> def outer(): ... non_local = 'non-local' ... def inner(): ... non_local ... return F('{non_local} is referenced locally') ... return inner() >>> outer() 'non-local is referenced locally' History ------- 1.0.3 -- 2009 Oct 22 ==================== - Added history to the project page. - Added additional documentation files. 1.0.2 -- 2009 Oct 22 ==================== - Reorganized metadata. - Removed dependencies on setuptools and nose. 1.0.1 -- 2009 Oct 3 =================== - Made minor additions to metadata. 1.0 -- 2009 Sept 25 =================== - Initial release.


نحوه نصب


نصب پکیج whl ScopeFormatter-1.0.3:

    pip install ScopeFormatter-1.0.3.whl


نصب پکیج tar.gz ScopeFormatter-1.0.3:

    pip install ScopeFormatter-1.0.3.tar.gz