"""
    chdir2
    ~~~~~~

    An alternative implementation of :func:`chdir.chdir`.

    :copyright: © 2014 by Petr Zemek <s3rvac@gmail.com>
    :license: BSD, see LICENSE for more details
"""

import os


class chdir2():
    """An alternative implementation of :func:`chdir.chdir`."""

    def __init__(self, dir):
        self.dir = dir

    def __enter__(self):
        self.orig_cwd = os.getcwd()
        os.chdir(self.dir)

    def __exit__(self, *exc_info):
        os.chdir(self.orig_cwd)

"""
    chdir2
    ~~~~~~

    An alternative implementation of :func:`chdir.chdir()`.

    :copyright: © 2014 by Petr Zemek <s3rvac@gmail.com>
    :license: BSD, see LICENSE for more details
"""

import os


class chdir2():
    """An alternative implementation of :func:`chdir.chdir()`."""

    def __init__(self, dir):
        self.dir = dir

    def __enter__(self):
        self.orig_cwd = os.getcwd()
        os.chdir(self.dir)

    def __exit__(self, *exc_info):
        os.chdir(self.orig_cwd)

Add missing parentheses after 'chdir'.
blog/en-2014-06-21: Add missing parentheses after 'chdir'.

It is a function, so we better add parentheses to make this clearer.
