Skip to content

Commit

Permalink
Merge pull request #231 from aherrera1721/master
Browse files Browse the repository at this point in the history
vector.__repr__ method now follows convention
  • Loading branch information
mwcraig authored Jun 8, 2023
2 parents 02ae301 + 2b82e74 commit fc50143
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions CONTRIBUTORS.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ We are certain the list is incomplete; please let one of us know by opening an [
+ [@0dminnimda](https://github.com/0dminnimda)
+ Mike Miller ([@Axe319](https://github.com/axe319))
+ Dan Miller ([@danx0r(https://github.com/danx0r))
+ Alex Herrera ([@aherrera1721](https://github.com/aherrera1721))

## Full timeline of vpython development

Expand Down
2 changes: 1 addition & 1 deletion vpython/vector.py
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ def __str__(self):
return '<{:.6g}, {:.6g}, {:.6g}>'.format(self._x, self._y, self._z)

def __repr__(self):
return '<{:.6g}, {:.6g}, {:.6g}>'.format(self._x, self._y, self._z)
return 'vector({:.6g}, {:.6g}, {:.6g})'.format(self._x, self._y, self._z)

def __add__(self, other):
if type(other) is vector:
Expand Down

0 comments on commit fc50143

Please sign in to comment.