dimanche 13 décembre 2015

Python - Conditionals in parameters [duplicate]

This question already has an answer here:

I'd like to know if in Python I can write something similar:

FILE *file = fopen(path, mode);
char tmp[block_size] = {0};

while(ftell(file) < file_length)
{
    fread(tmp, 1, (file_size - fw.tell()) > block_size ?
                     block_size : (file_size - ftell(file)), file);

    // do something
}

fclose(file);

Aucun commentaire:

Enregistrer un commentaire