# 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:** 11

<div class="post-metadata">

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

</div>

I’m not sure if there is a clean way to set default for a `double[2]` argument, so I fully agree that overload is a better approach in this case. In general, I’m not sure that overloads is always preferable (and if they are preferable then not because they are better for managing backward compatibility), but that’s a separate discussion topic in itself - so I’ve added a new topic for this:

> [@Default argument value vs. overload](https://discourse.vtk.org/t/default-argument-value-vs-overload/14498):
>
> Recently the following was added to the VTK coding conventions document: 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 th…

---

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