Ignore:
Timestamp:
Aug 4, 2013, 5:29:02 PM (6 years ago)
Author:
Stefan Schwarzer <sschwarzer@…>
Branch:
default
Message:
Use double quotes (") for strings.

I used to have a rule to put "identifier-like" strings in single
quotes (') and other strings in double quotes. For example, dictionary
keys would usually be in single quotes, but error messages in double
quotes.

Unfortunately, there are many border cases, so over time I've become
tired of thinking about when I should use one kind of quotes or the
other. So everything is in double quotes now. Also, I guess most
people are rather used to double quotes for strings and thus will
welcome the change. :-)
File:
1 edited

Legend:

Unmodified
Added
Removed
  • ftputil/file.py

    r1342 r1343  
    150150        # Always use binary mode (see above).
    151151        transfer_type = "I"
    152         command = 'TYPE {0}'.format(transfer_type)
     152        command = "TYPE {0}".format(transfer_type)
    153153        with ftputil.error.ftplib_error_to_ftp_io_error:
    154154            self._session.voidcmd(command)
    155155        # Make transfer command.
    156         command_type = ('STOR', 'RETR')[is_read_mode]
    157         command = '{0} {1}'.format(command_type, path)
     156        command_type = ("STOR", "RETR")[is_read_mode]
     157        command = "{0} {1}".format(command_type, path)
    158158        # Force to binary regardless of transfer type (see above).
    159159        makefile_mode = mode
Note: See TracChangeset for help on using the changeset viewer.