Skip to content

Commit 8a8ea3e

Browse files
committed
exp2py: fix comparisons with None
1 parent 70b5d0d commit 8a8ea3e

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

src/exp2python/src/classes_python.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -762,7 +762,7 @@ LIBdescribe_entity( Entity entity, FILE * file ) {
762762
/* if the argument is not optional */
763763
if( !VARget_optional( v ) ) {
764764
fprintf( file, "\t\t# Mandatory argument\n" );
765-
fprintf( file, "\t\tassert value != None, 'Argument \"value\" is mandatory and cannot be set to None'\n" );
765+
fprintf( file, "\t\tassert value is not None, 'Argument \"value\" is mandatory and cannot be set to None'\n" );
766766
fprintf( file, "\t\tif not check_type(value," );
767767
if( TYPEis_aggregate( t ) ) {
768768
process_aggregate( file, t );
@@ -773,7 +773,7 @@ LIBdescribe_entity( Entity entity, FILE * file ) {
773773
fprintf( file, "%s):\n", attr_type );
774774
}
775775
} else {
776-
fprintf( file, "\t\tif value != None: # OPTIONAL attribute\n\t" );
776+
fprintf( file, "\t\tif value is not None: # OPTIONAL attribute\n\t" );
777777
fprintf( file, "\t\tif not check_type(value," );
778778
if( TYPEis_aggregate( t ) ) {
779779
process_aggregate( file, t );

0 commit comments

Comments
 (0)