1. In a 3- to 4-quart pan, combine 1 cup water, butter, and the sugar if using; bring to a boil over high heat. Add flour all at once and stir quickly until mixture pulls away from pan sides and masses together. Remove from heat and stir until flour is incorporated and mixture is smooth. Let cool about 5 minutes, stirring occasionally.
2. To mix by hand, add eggs, one at a time, to warm butter-flour mixture in pan, beating with a wooden spoon after each addition until dough is smooth and satiny.
To mix with an electric mixer or food processor, scrape warm butter-flour mixture into a bowl. Add eggs, one at a time, beating or whirling after each addition just until smooth; do not overmix.