<｜begin▁of▁sentence｜>### Instruction:
Given an empty graph where we need to add edges with a default 'weight' attribute value of 1.0, how can we use the AttributeSpecification constructor in igraph to define this attribute with its default before adding the edges?
### Response:
from igraph import Graph, AttributeSpecification

# Create an empty graph
g = Graph()

# Define a new attribute with default values
attr_spec = AttributeSpecification('weight', 'e', default=1.0)

# Add edges to the graph with the default 'weight' attribute
g.add_edges([(0, 1), (1, 2), (2, 0)])

# Print out the edge weights to verify
for e in g.es:
  print(e['weight'])
<|EOT|>
