Re: [Python-Dev] [Python-checkins] cpython: fix formatting

2011-10-04 Thread Benjamin Peterson
2011/10/4 Victor Stinner :
> Le 04/10/2011 01:35, benjamin.peterson a écrit :
>>
>> http://hg.python.org/cpython/rev/64495ad8aa54
>> changeset:   72634:64495ad8aa54
>> user:        Benjamin Peterson
>> date:        Mon Oct 03 19:35:07 2011 -0400
>> summary
>>   fix formatting
>>
>> +++ b/Objects/unicodeobject.c
>> @@ -1362,8 +1362,8 @@
>>              return -1;
>>          _PyUnicode_CheckConsistency(*p_unicode);
>>          return 0;
>> -    } else
>> -        return resize_inplace((PyUnicodeObject*)unicode, length);
>> +    }
>> +    return resize_inplace((PyUnicodeObject*)unicode, length);
>>  }
>
> I chose deliberately to use "else return ...", it's more readable for me.

Then there should be braces around it.



-- 
Regards,
Benjamin
___
Python-Dev mailing list
Python-Dev@python.org
http://mail.python.org/mailman/listinfo/python-dev
Unsubscribe: 
http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com


Re: [Python-Dev] [Python-checkins] cpython: fix formatting

2011-10-04 Thread Victor Stinner

Le 04/10/2011 01:35, benjamin.peterson a écrit :

http://hg.python.org/cpython/rev/64495ad8aa54
changeset:   72634:64495ad8aa54
user:Benjamin Peterson
date:Mon Oct 03 19:35:07 2011 -0400
summary
   fix formatting

+++ b/Objects/unicodeobject.c
@@ -1362,8 +1362,8 @@
  return -1;
  _PyUnicode_CheckConsistency(*p_unicode);
  return 0;
-} else
-return resize_inplace((PyUnicodeObject*)unicode, length);
+}
+return resize_inplace((PyUnicodeObject*)unicode, length);
  }


I chose deliberately to use "else return ...", it's more readable for me.

Victor
___
Python-Dev mailing list
Python-Dev@python.org
http://mail.python.org/mailman/listinfo/python-dev
Unsubscribe: 
http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com