# vtkSphere : passing a null parameter in ComputeBoundingSphere from Python

**URL:** https://discourse.vtk.org/t/vtksphere-passing-a-null-parameter-in-computeboundingsphere-from-python/14473
**Category:** Support
**Created:** [August 25, 2024, 10:37am UTC](https://discourse.vtk.org/t/vtksphere-passing-a-null-parameter-in-computeboundingsphere-from-python/14473 "2024-08-25T10:37:00Z")
**Posts on this page:** 1
**Showing post:** 10

<div class="post-metadata">

### Author: ![dgobbi](https://discourse.vtk.org/user_avatar/discourse.vtk.org/dgobbi/32/18_2.png) [@dgobbi](https://discourse.vtk.org/u/dgobbi)
#### Post date: [August 28, 2024, 11:50am UTC](https://discourse.vtk.org/t/vtksphere-passing-a-null-parameter-in-computeboundingsphere-from-python/14473/10 "2024-08-28T11:50:21Z")

</div>

Yes, overloads are preferred over default arguments.

[https://docs.vtk.org/en/latest/developers\_guide/coding\_conventions.html](https://docs.vtk.org/en/latest/developers_guide/coding_conventions.html)

> [@](#):
>
> 1. Prefer overloading functions to default arguments.  
> Rationale: Default function arguments in C++ are a tempting way to add an argument to a function while maintaining easy backwards compatibility. However, if you later want to add another argument to the list in a way that preserves backwards compatibility, it, too, must be a default argument. To supply the second of these arguments in a call forces you to also supply the first argument, even if it is the default value. As a result, this is not a clean way to add a argument to a function. Insetad, function overloading should be preferred.

---

_[View the full topic](https://discourse.vtk.org/t/vtksphere-passing-a-null-parameter-in-computeboundingsphere-from-python/14473)._
