getattr(settings, 'VIDEO_PORT', None) is better: it's very rare to call __dunder__ methods directly.