When was the pistol invented?

1787