0

In Python, could I write 2 methods having the same name but different number of parameters ?

em.on_create_experience(action.dest_id)
em.on_create_experience2(action.dest_id,0)
Younès Raoui
  • 211
  • 5
  • 10

1 Answers1

1

You can't write two separate methods with different parameter lists. But you can write one method with optional keyword parameters to do what you want.

J. Owens
  • 832
  • 7
  • 9