Le 23/08/2015 02:01, Feodor Tersin a écrit :
> From: kevin.mitch...@rackspace.com
>
> Actually, there should no longer be a need to use contextlib.nested.
> We've explicitly dropped Python 2.6 compatibility, which means we're
> expecting compatibility with Python 2.7+ only, and as of Python 2.7, the
> 'with' statement supports accepting multiple 'as' clauses. The
> contextlib.nested tool was really only necessary to work around that
> functionality being missing in Python 2.6, and has been deprecated as of
> Python 2.7 because it's no longer necessary.

'with' statement has multiple form, but it does not allow line breaks inside. It leads to ugly formatting. See https://github.com/stackforge/ec2-api/commit/f5b320edbbc8ab554dae496dcae78be6fdd25fe7#diff-bfcbc316f2eb6b39de99a921a5753aadL631



Yeah, even if the 'with' statement accepts now more than just one clause, it doesn't accept to have it in multiple lines using the () for leaving less than 80 chars for each line.

-Sylvain


__________________________________________________________________________
OpenStack Development Mailing List (not for usage questions)
Unsubscribe: openstack-dev-requ...@lists.openstack.org?subject:unsubscribe
http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev

__________________________________________________________________________
OpenStack Development Mailing List (not for usage questions)
Unsubscribe: openstack-dev-requ...@lists.openstack.org?subject:unsubscribe
http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev

Reply via email to